It's not like they magically respawn or something. There are people who have studied the root cause of homelessness, and: it's housing. Sure, other factors make things worse, but there's more homelessness where housing is expensive.
Which stands to reason: when a thing is expensive, fewer people can afford it.
https://homelessnesshousingproblem.com/
That's why, ultimately, the biggest YIMBY win is going to be not helping out people currently homeless, but stopping the pipeline in the first place by having enough housing.