An example: https://en.wikipedia.org/wiki/Steinst%C3%BCcken
Steinstücken was an exclave of West Berlin located in East Germany. It turned out to be inconvenient for the residents to cross borders to get to the rest of Berlin, so a land swap deal was arranged for the road linking Steinstücken to the rest of West Berlin to become part of West Berlin, and some other land elsewhere was given in return.
This road, however, crosses a railway on a bridge, and the East Germans didn't want their railway to pass through West Berlin. So the border actually runs under the bridge and above the railway, and if you stand on or underneath the bridge, the actual region you'd be standing in depended on your altitude, even if the latitude and longitude was the same. This is still true today - although the regions are the Bundesländer of Berlin and Brandenburg.