Yeah, city law can easily override deed laws. But further, eminent domain allows the city to strip away deed restrictions through a "one weird trick". The city can eminent domain the land from themselves removing the restriction and then sell it privately.
The same way the city can eminent domain your home and put a road through it. The HOA can't stop the city from putting in a new road.