I don't know, by solving their rent problem with better tax structures and/or more development? Under what possible ethical or legal argument could you make it illegal for someone to be homeless?
How about we rehabilitate them, teach them skills that are needed in the workplace in order for them to be a productive member of society and stop enabling.
In you first post you say prosecute, in the follow-up you say rehabilitate. Providing people with stable basic needs and like housing and education is a prerequisite for rehabilitation. It's not "enabling" in the negative sense of enabling bad behavior, rather it's enabling people to make something of themselves. Or at the very least, keep them of the streets and out of criminality.
Prosecution only leads to more problems, as people cannot adequately gain the skills they need in US prison and are then shunned by US employers.