We got wedged into this situation by politics, and we'll have to get out by politics.
One obvious solution is to replace the people who are busy wedging us ever harder into this mess. That's been tried--it isn't easy at all, and hasn't seemed to happen yet.
Another is to find a way for the existing elite to save face in a flip-flop. If they can find someone to blame they can change course without endangering their hold on power. They could, for example, find a crying need for mental health care among the homeless, a need that was thwarted by the callous closing of mental health hospitals by Reagan and the other evil money-hungry sorts. (That particular claim wouldn't be true, of course, but that's no bar in politics--truth seems to be an impediment to be avoided at all costs.) The homeless need hospitals, and the progressives are just the people to help them!
Of course, there would have to be something in it for the well-connected. And the existing experts-for-hire would scream unless you found ways to work them into the plan. And the elites would still be the kind of people who double-down on craziness. And they'd still need to find a way of enforcing drug restrictions without harshing the mellow of an important subset of the San Francisco voters. But if a sacrificial lamb can be procured...