No, Posse Comitatis does not prevent US Troops from being used to defend the homeland’s borders from invasion. Trump should probably also declare martial law.
Glad to hear that you're such a sharp Constitutional Law lawyer.
U.S. Troops can shoot them, but cannot arrest them.