I know exactly zero people that use public transport because of safety, specifically homeless/druggies. And yes, we all tried. I was an idiot and went with a kid, for my first and last time, after listening to a local, with mental blinders on.
Cities poll these things. Look up your local public transport polls, to see what others think. If you're in SF, for example, you wont be remotely surprised by the results [1].
[1] https://www.independentnews.com/news/regional_and_ca/bart-su...
And, you haven't said a word about even the possibility that good public healthcare, including mental healthcare funding, and a good social safety net vastly reduces those terribly inconvenient people in the streets with nowhere to go.
But in that case you'd have to blame the people in charge instead of the people.