>

Just let them do drugs, jeez, why is it any of our business. They'll get sober when they are ready and no one can force it to happen before then.
What is the long term solution? >

Giving people short term housing is proven to get people out of homelessness. >

Alot more is needed than that, mental health and addiction treatment, often times (not all the time) housing will be declined due to prohibition against doing drugs/curfews, etc. 
Cal CARES Court which will hopefully be implemented should help with this and also enforcement compelling individuals to get treatment they need.