In the US as a whole, sure. But the housing affordability issues aren't across the whole US: it's in specific metros. Houses in Nebraska don't solve the affordability crisis in San Francisco.
Furthermore, people aren't exactly keen on letting homeless people live in their property for free. Hotels in my city experimented with this: they got small checks for housing homeless people during COVID, when lockdown massacred the hospitality market. It was a complete disaster: the rooms were trashed and they lost more money than they received from the government.