the constitution has many flaws but addressing our current circumstances is not among them; the framers were in fact quite concerned about this kind of thing and were clear that it should not happen here
what they did not and could not guard against is the people in charge ignoring their plain text
As it happens though, the framers of the US constitution did say it: in the 4th amendment, the 5th, the 10th, etc.
What they didn’t provide for is federal immigration enforcement of any kind, only “a uniform rule of naturalization.” Nor did they give the federal government a plenary police power.