It's like this:
If someone goes to another country and breaks the laws there, it's a case of "So sad; too bad." Their country; their rules. If someone in Country A broke the laws of Country B but was in Country A at the time. then Country B can go pound sand.
One example you might be interested in is the rock and roll "pirate" broadcasters that, in the 1960s, operated in international waters and beamed broadcasts into the UK. The best the UK could do was to pass a law in the mid 1960s making it illegal for UK subjects to be associated with them. Happen to know someone associated with one, and I think he said he had to stop going into Britain for fear of arrest. I think he was given a warning, but was told that years ago so not sure about that. He was also involved in some work in the UK, so I don't know how that fit in with when he could stop going there: Either his work in the UK was before the threat of arrest, or the threat of arrest faded away and he did work there later. Anyway, the point is that the UK could do nothing about the "pirate" broadcast ships, even though they were aiming broadcasts to the UK.