Unless the production crew had special permission for things, you have to remember that just because a movie is shown to take place somewhere, doesn't mean it's actually filmed there. There's a lot that can be done with special effects to compile different shots together to make them look like the location needed.
Granted this is for television shows, but still, it highlights how shows can be made to look like they're taking place in a specific location, when they were actually filmed on a studio backlot with the locations inserted later by VFX teams.
I can't seem to find it, but in the early days of Hollywood, they actually had a map of locations in and around California that could be used to depict various world locations based on genre type.