Get a 2 bedroom. Live with a roommate. Should have lots of availability at $4k for 2BR. Stay north of Cesar Chavez and east of Presidio for better weather.
Rent a room on Craigslist. It takes some effort but there are options as low as $800/mo.
Oakland. Half the rent; half the commmute. That room across SF from your job is two hours a day on Public Transit.
Hunters point
Try SOMA. Close to Tenderloin but also closer to FiDi. Somewhere between 8th to 11th Street.
Soma and The Mission are fun neighborhoods. Like others said get an apartment with roommates not a 1 BDR
Sharing a pad in SF is your only realistic option at that budget
Get a bayview crib before it turns hipster
Like buy it? Lol
it depends on what you like to do honestly. wherever you go in downtown SF you will have to share a place with roommates at that budget. nopa/hayes/pac heights are great, cleaner, and still within 10 minutes accessibility on rideshare or 30 minutes by bus for downtown north beach/nob hill/russian hill are too in the thick of it for my tastes, but great if you want to be near downtown soma/fidi - accessible but shut down at non work hours Richmond/sunset - cheaper rents but commute times go up
pac heights is great, couldn't recommend more tbh. It's quiet, close to everything, and sunny. @op you could probably find an awesome 2br for 4k flat.
Tenderloin with that budget
Rip
One of my relatives lives there. He has a decent place for super cheap and just takes cabs home at night. Says it's not really a huge problem.