Of course this is the right thing to do, but we must realize that it's not going to be "enough", at least in most cases.
The municipalities (and states) involved are going to "double-down", the loss-of-funding be damned. To them, this is (cough) principle.
So... they must be broken by force.
This will involve the use of federal agents, perhaps backed by federal troops.
Think "Little Rock, 1957"...