The simple solution is to just not “mail the checks” and let the cities sue for the funds. It will take years to move through those very same courts...
It is one thing to stop the POTUS from doing something. It’s quite another to order him to DO something... Writing checks can take a VERY VERY long time... plus, the Postal Service is slow as molasses these days... Checks could even get lost in the mail or something...