San Francisco, like many metropolitan cities, chased after the "build 'em big/high" development projects for decades. This is because like almost ALL municipalities, much of their budget money comes from permits, and RE developers pay a lot of $$$$$$ in permits and inspections. In doing so, the problem is that (again like many cities) they built those high-rises after razing a huge number of small business shops, small apartment bldgs and old-style residential hotels with cheap rates for lower-income elders and the poor.
Small businesses closed up, small apartment buildings turned into expensive condos and luxury apartments, and many of the poor became homeless, beginning a rise in homelessness that has only increased.
For a while expensive restaurants and high-end shops came in to support the corporate businesses and high-income residents. But when times turned bad (the pandemic/lockdown, and then tech slowdown/firings) everybody suffers.
Also, remember that in the SFBA, WFH (work from home) remains stubbornly popular. We still have the highest % in the nation of workers who only come into the office 2 or 3 days a week. Some younger people I know haven't been in an office except for the occasional in-person mtg, in almost 3 yrs! So public transit is in financial trouble as well.
City officials are finally now realizing that downtown is no different than any other neighborhood. If you have people who live there 24/7, services will inevitably follow. But converting commercial RE to residential RE is not cheap; there is another whole encyclopedia of rules, permits, and regulations that come into play. It is an accepted tenet of RE that it is cheaper to tear down and rebuild anew, rather than remodel. But when a bldg is forced into bankruptcy, meaning it has a negative cash value, who is going to be able to pay those millions of $$$$$$$ needed for conversion, is not a simple question to answer.
There is also, in the SFBA, the question of personal safety in a high-rise. You might have a great view from 35 stories up, but did you know that the longest length of hose a firefighter can utilize will reach, at most, 5 or 6 stories? Did you know that it takes, on average, 45 minutes to fully evacuate a 25-story building (we won't even guess at the time needed for the 61-story Salesforce tower)?
Not to mention the quake danger - a great many high-rises are built on landfill. SF Bay used to be A LOT bigger before they started filling it in with garbage to make more land available on which to build.
That said, it is certainly possible to reinvigorate downtown areas. Many cities have done it. It's a painful adjustment, no matter where. But San Francisco remains a place that attracts people. Americans might consider it outrageously expensive to buy RE here, but wealthy foreigners consider it one of the most affordable of global cities.
The wealth equity gap in CA is massive. The media that loves to scream headlines that CA is losing population doesn't tell you that most of the people who are leaving make less than $125,000/household, which is poverty level here. The average income of people moving INTO the state is >$250,000.