The President should just close the US Mexico border to all migrants until this case is resolved. SCOTUS previously ruled has the authority to ban immigration by country of origin. Close the border completely until his policy is upheld. This is necessary to control the risk of the coronavirus pandemic and not just about preventing the freeloaders.
The answer is as you say to “close the border completely”, ALL of our borders and allow NO ONE entry (even our own citizens returning from abroad) before they are tested or the virus and quarantined or sent home if it is found.
This will pass, of course but until then it must be Americans here in America first and the rest of the world second.