They already are. No one enforces the laws.
I don’t believe “sanctuary cities” are illegal and specific legislation needs to prohibit it at the federal level.