I happen to live in Dallas, near enough to the downtown cluster of homeless shelters and highway junctions where panhandling seems to be most lucrative than I'm more or less guaranteed to see quite a few homeless about when I'm out walking. And I walk a lot. Enough to see the same people repeatedly, for years. People living in tents or just tarps attached to trees, walking from there to the same highway exit, day after day, then back again. I usually go for my walks before sunrise and after sunset, which is around the same time they're doing their within-day migrations from wherever they sleep to wherever they beg.
Since I can see the same people day after day, see where they sleep, I'm reasonably sure they largely don't seem to have mobile devices with data plans, no regular Internet, they probably know how to read but don't seem to be spending time in libraries researching comparative crime enforcement strategies from cities around the nation. I'm not seeing a whole lot of people who seem to be picking from among everywhere in the US they might go and then figuring out a way to go there.
Instead, I see them yelling at ghosts that aren't really there. As you said, these are often people with severe mental illnesses. Maybe on the margins a few are leaving for greener pastures, but I'm not sure the resources and capacity for rational decision making are really there for a whole lot of them to be doing that, at least the truly worst-off that are going to be homeless basically no matter what if we don't provide free long-term care facilities for mentally ill that are not effectively prisons. Plus, I can see they largely aren't leaving since I see the same people here years later from when I first saw them (usually men, mind you - I'm guessing the women are more likely to just get killed at some point).
While I don't want to doubt your personal feelings of safety in one city versus another, it's worth considering that, for whatever reason, San Francisco does a worse job or just doesn't try to keep the homeless out of the places richer people might frequent, but they exist in other cities as well, including cities in Texas and Alabama. Are they dangerous? I don't know. I know one guy my wife and I used to call "Santa Claus" because of his long white beard was arrested a while back for stabbing a guy to death, and is probably in prison now since we haven't seen him in five years, but the guy he stabbed was another homeless person. I've never heard of one of them attacking a "citizen." The few times I've had contentious interactions, usually due to my past spine problems that led to some serious pain and anger issues on my part, I'm pretty sure I scared them more than they scared me. After all, I'm well-fed, sleep in a bed, and have access to a gym. I should be and probably am a lot stronger than they are.
All that said, while I'm not convinced that the very worst of the more or less permanent homeless due to mental health are really migratory enough to be considered a national problem, that doesn't mean federal funding of solutions wouldn't help. Realistically, while I think cities should be the ones doing something about this, they either don't or their solution is to round up the homeless on buses and send them to other cities. That practice should definitely be banned and that would have to happen at a level of government higher than cities.