The "The Obvious Answer to Homelessness" by Jerusalem Demsas, published by The Atlantic (linked in another comment by thamer) argues that this hypothesis is falsified, and can cite research:
> Few Republican-dominated states have had to deal with severe homelessness crises, mainly because superstar cities are concentrated in Democratic states. Some blame profligate welfare programs for blue-city homelessness, claiming that people are moving from other states to take advantage of coastal largesse. But the available evidence points in the opposite direction—in 2022, just 4 percent of homeless people in San Francisco reported having become homeless outside of California. Gregg Colburn and Clayton Aldern found essentially no relationship between places with more generous welfare programs and rates of homelessness. And abundant other research indicates that social-welfare programs reduce homelessness.
> Few Republican-dominated states have had to deal with severe homelessness crises, mainly because superstar cities are concentrated in Democratic states. Some blame profligate welfare programs for blue-city homelessness, claiming that people are moving from other states to take advantage of coastal largesse. But the available evidence points in the opposite direction—in 2022, just 4 percent of homeless people in San Francisco reported having become homeless outside of California. Gregg Colburn and Clayton Aldern found essentially no relationship between places with more generous welfare programs and rates of homelessness. And abundant other research indicates that social-welfare programs reduce homelessness.