I'm pretty far left but I have to agree that some people are not mentally capable of independence, cause public harm, and need to be forcibly committed. I want that to be done carefully and humanely. I don't want someone who sleeps on the street and causes no trouble to get institutionalized. But the worst of them should get jailed, tried, and then sent away.
We also need to support people at risk when they're young. If their parents had mental health support, if they didn't experience a loss of housing as children, if losing their job didn't make opioids looks so attractive, we wouldn't have that many people unable to care for themselves.