The problem is that police, fire departments, and hospital ERs have to respond to ALL emergencies. If all residents are not counted, then the funds to take care of all of us, including you and me, are reduced.
It would be straightforward and appropriate to count “residents” for some purposes, and “citizens” for others. It would also be straightforward and appropriate for states to support the idea that border control is necessary to preserve any nation, and that this nation, as conceived, is worth preserving.