This is why I'm suspicious of any efforts to "address" homelessness with involuntary mental health care.
Being homeless or unable to provide for your needs isn't a crime or a mental illness.
Give somebody a home and let them address their potential issues once they are safe and secure, with a roof over their head.
And criminalizing homelessness perpetuates it.