San Francisco is 49 square miles. 7x7. So basically a small city.
5-6 square miles are brutal. The rest is beautiful with amazing views and restaurants- and no homeless. Unfortunately Union Square where a lot of the hotels are is right next to the tenderloin which is among the worst parts of the city.
Avoid the tenderloin, South of Market and mission street from 5th-9th and you’ll be fine.