Mayors and governors who create sanctuary cities are openly defying American law.
Cutting off federal funds will get their attention but it also punishes Americans who want no part of these lawbreaking politicians. So although it brings collateral damage I would definitely do it.
But what really needs to be done is to prosecute these treasonous politicians and let them do some prison time. See if the others can decide whether they are Global Citizens with no allegiance to the country they live in.
They can be charged with harboring illegal aliens, a federal felony. Lock up a few and the rest will get their minds right.
Actually, what needs to be done is for those very same citizens to vote the non-agreeable turds out of office.