You are skipping over the part where the government can change the relevant laws that make public housing expensive. Public housing also doesn't have to be built by the government directly so if private construction firms can do it cheaper the government can let them build the housing.
The items that make this expensive have to do with the standards that must be met, zoning and approval processes, and so on. These are things that a private construction firm, under contract with SF, does not find easier or cheaper.
Personally, I like the idea of SF maybe getting in the way of housing construction a bit less. But I also understand that voters seem to like the system as it is. Plus, only some of these laws are readily changed by SF - the plebiscite for public housing law is a state prop from the 70s. Many of the other requirements are also propositions at either state or local levels.
As you say, it's completely true that the government can change the relevant laws. It's just perhaps more subtle than that, as there are multiple levels of government involved and some of the relevant laws are quite challenging to change.
If anything, I would naively expect most of the relevant policies here to be things property developers would be quite strongly against. Perhaps you can enlighten me with critical factors I've overlooked?
Benioff Hospital would be unaffected, but only because it's in no way run by SF.
When it does manage to build public housing, SF spends approximately a million dollars a unit to do so. That's purely to get a habitable unit. It includes none of the maintenance costs, which will increase over time, or the social services required to make public housing work as intended.
With that in mind, giving literally 100% of San Francisco's budget to building public housing could produce 12,000 units. That would mean shutting down Zuckerberg General Hospital, street cleaning, street repaving, SFO, schools, and anything else SF does.
Incidentally, the Supes only actually get to control about $3.5bn of that. So now we're reduced to 3,500 units a year... in a city where population growth averages 11,000 people a year. And we still haven't talked about social services, maintenance, or how allocation of what will never be enough public housing units will work.
I think these numbers lay clear that public housing is unlikely to solve SF's housing woes. Don't hesitate to ask if anything is unclear!