It’s a simple fix. Turn off the faucet of freebies, and amazingly they leave on their own.
Agreed, in part. There's still the problem of employers, though ... and they're interested in cheap labor, as opposed to giving out freebies.
Employers are probably the larger problem here, and fixing that part of it is considerably less simple. Big penalties are part of that fix; and there should also be a means by which prospective employers can easily check the legality of any applicant.
Of course, that leads to the need for a registration system, and that most likely leads to some form of national ID....