I still don't see how "government" can discern who is here entirely legally and who is not. That strikes me as an important point.
I've noted before that when leaving the Schengen Zone, they check your passport, and stamp it. Otherwise, you can overstay, and it would be obvious if they check your passport and see the date you arrive. The US has no such exit process, so a person can enter legally on a 90 day visa and just stay.
And these "sanctuary cities" as I understand them just don't ask immigration status so they have no information to report. Can we make them ask? They arrest someone and ask, and Juan says "I was born here". OK, fine, then what?