For most large i.e. "sanctuary" cities, we are going to need some promise of total immunity for officers who arrest illegals. Not just from prosecution, but also from termination and discipline, as they will be in direct violation of the mayor's and chief's orders.
CALexit 2018
Yes, you point out a problem which should be solved when the federal funding is cut.
Trump could extend pardons if things get messy, but in general, local law enforcers have to enforce federal law or face these consequences.