It’s no different.
If a foreign aircraft flies through ‘Australian controlled airspace’ but never comes into Australian territory, there is no offence under Australian law.
It may well be an offence under the law of the country of the aircraft’s nationality, but that’s a matter of that country’s domestic law, not Australia’s. Australia can pass a valid law that says that no Australian aircraft or holder of an Australian pilot’s licence may do X anywhere on the planet. Australia cannot pass a valid law saying the same about foreign aircraft.