Can't you see you are denying agency to a whole population because they live in a way you don't agree with? And keep them like that until they do?
I know homelessness takes a huge toll on mental health, but to incarcerate homeless people until they are "cured" without focusing on the causes for the mental health problems some experience is just that: taking them off the streets to somewhere people aren't forced to acknowledge they exist.
The man that lives under a bridge on the walking path near my house, who alternates between screaming for hours on end and being in a fentanyl trance, is not making logical decisions and would be better served by a psych ward and addiction treatment.
Please, stop. You didn't say depriving the seriously mentally ill and the terminally drug addicted of agency. You said it about homeless people, justifying with a plausible, but not confirmed, argument that they are mentally ill, drug addicted, or both.
I too want the mentally ill and drug addicts to be helped, and even conced that, in those cases, it might need to be necessary to treat them against their will, but to just incarcerate (because good psychiatric care is expensive, and the US, it seems, can't even afford universal healthcare on par with the average European country) them even though they have not been convicted of any crimes.