Silly things like laws and constitutions do not apply at the US border. Or anywhere near it.
https://www.aclu.org/know-your-rights-governments-100-mile-b...
https://www.aclu.org/know-your-rights-governments-100-mile-b...
https://www.aclu.org/other/aclu-factsheet-customs-and-border...
So the argument to be made is that the application of the law or the law itself is not in keeping with the Constitution, not that law doesn't even apply.