If at least half the homeless population is mentally ill, and they can't find treatment because there are no places to treat people without funds, then of course money is part of the problem. You might not think it's well spent, but I can tell you with 100% certainty that lack of treatment for mentally ill homeless contributes to the problem.
Thank goodness for the VA for veterans. They do provide mental health treatment, and in our little center, the veterans have much better outcomes because of it. It's an ongoing battle for many, with some doing OK for a year or three or whatever, then they come back. But that's what it takes. Hard to get and keep a job if you're mentally ill, go off the meds because they make some feel bad or 'drugged' all the time, which they are, but the alternative is full blown mental illness. Etc.
There is no easy answer and there are lots of barriers to addressing the problem long term - reliable funding for needed programs a big one but obviously not the only one.
What we do see frequently around us are places that get funding from state or local or the feds and they operate as flop houses for the mentally ill, and pocket the money intended for mental health treatment or whatever. So guys come in, stay till funding runs out, then are kicked out to the streets. More of those places won't change a thing for most.