The premise that the law doesn't apply because you're not in the country is false. The constitution applies generally everywhere to all Americans, it's just that what's regarded as reasonable differs during a border search. IANAL, so just my lay opinion on this. Just to validate this, it's only because the constitution exists that the border authorities have any legal basis in doing inspections.
> On or about January 24, 2025, in the Northern District of Georgia...
[1]: https://storage.courtlistener.com/recap/gov.uscourts.gand.35...
But in general, the thing to note here is that the 4th amendment is always applicable and in force. It's how it's interpreted that changes depending on the circumstance.
- if you're deemed to be on US soil, constitutional protections (4A) apply; can't be destroying "evidence" unless you're accused of a crime or found to have committed a crime
- if you're deemed _not_ yet on US soil, then how can you be charged with a crime under _US_ law?
Also, that constitutional protections are suspended within 100 miles of a land, sea, or air border.
https://www.congress.gov/crs-product/RS22497
Although obviously not all US laws apply and enforcement is a whole other kettle of fish.