This would involve incarcerating a lot of homeless people, which is expensive, and pro-homeless activists would see it as a human rights abuse and fight it.
It would be expensive, but would have everyday visible tangible effects which you can't always say about other government spending. In regards to people thinking it's abusing people's rights they will just have to be ignored or taught to respect other people's right to a good experience with public transport.
Deeply unfortunate, but we're arguably in a lose-lose situation where suffering from the problem has abuses, and yet so does fighting those who profit or benefit from the situation.
There's immense social capital and NGO patronage at work surrounding 'homeless' - and I parse that as mentally ill now, as it's an insult (IMO) to the homeless who are perfectly capable of respecting others and participating in the social contract.