>

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.
What is the long term solution? >

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