Sadly, the racist Supreme Court under former President Taft ruled that the city does have pretty much unrestricted ability to interfere with what people do in their homes and businesses, as a police power.
Euclid v. Ambler (1926) https://en.wikipedia.org/wiki/Village_of_Euclid_v._Ambler_Re....
the racist Supreme Court under former President Taft
It was a 6-3 decision, and one of the dissenters was, in fact, a Taft nominee.
Does anyone really care about the Constitution anymore? At least in SF, I doubt so.