I think it was Alabama some years back, was putting a bill through that would crack down on illegals by strictly enforcing labor laws, welfare rules, housing, detainment, referrals to ICE, etc.
As I recall, the illegals began pulling up stakes and high tailing it to California, even before the bill passed.
I remember a state doing this and the results of illegals leaving, but thought it was AZ.
Either way the fact is as you have pointed out is that if laws are enforced then we will see less illegals and those looking to violate the laws here.
States in the upper Midwest did that 20 years ago, and liberal Minnesota didn’t want to follow suit - and a lot of dregs ended up there.