What if your flight begins and ends in states allowing you to own weapons - but you fly over NYC, Chicago, Washington, DC, Maryland or NJ?
Seems you are breaking their laws - and they can legally be where you land to arrest you - for possessing a weapon in their communist state.....
?????????
As long as you are traveling, and not in physical possession while traveling through the areas, then you are OK.
BUT if you ever find yourself unexpectedly landing in NYC, then you must NOT take physical possession of your bags containing firearms for any reason, but instead make the airline get the bag to your destination. Practically every year I see a news story of some guy getting arrested over this.
One can transport firearms in a locked case through the USA either in a plane or vehicle — federal safe transport law.