That’s a bizarre statement. SF has ugly areas but still feels very safe. Would feel much more comfortable being dropped off in the worst places there vs Chicago, St Louis, LA, Miami, New Orleans, Atlanta and a bunch of other places
Downtown San Francisco can be unpleasant but you are more than 10x as likely to be killed in Orleans Parish (51.7 deaths by assault per 100k) than San Francisco County (4.9).
I'm really not trying to cherry pick stats, death by assault / homicide is a pretty good indicator of levels of violent crime. SF-proper (i.e. San Francisco County) has a huge and highly visible homelessness problem and is definitely an outlier on that dimension. But while that is unpleasant it is less worrying than actual violence.
The US limits gun control so even in states like California that try to do something about it there are many more deaths than in countries which actually do something about it.