This is fundamentally false.
While it is true that there was inexpensive housing available in the USSR, and that rents were quite reasonable compared to anything that currently exists in the US, and people couldn't readily be evicted if they lacked the ability to pay, it's a flat-out lie to say that that was the "solution" to homelessness, or that it eliminated the problem. Rather, the USSR criminalized being homeless and not being engaged in socially-productive labor; people that were homeless ended up in prisons and were labelled as parasites. The problem that we have now is that the official records simply didn't record the problem, in much the same way that Stalin had histories and photos revised to eliminate people that had become enemies of the state.