The "gay part" of Philly is mostly downtown (Center City) to South Street, with gay bars concentrated between Broad and 11th St. That's a pretty expensive area to rent even a studio, though.
I'd recommend living somewhere along the Broad Street or MFL (the "el") subway lines. I would not recommend living anywhere that requires a commuter train: if you haven't heard, SEPTA is being absolutely gutted and it's looking like anywhere from 3 entire train lines up to fucking all of them may be shut down next year. Trolleys and buses may also be on the chopping block; rumor is the subway lines are least likely to suffer cuts.
As for trans safety, ymmv by neighborhood. I have barely any personal insight into that (am lesbian but cis). Philly as a whole is fairly accepting of LGBTQ+ individuals and is a bit of a progressive bastion within conservative "Pennsyltucky" suburban and rural areas. Delaware county, where I was when I lived in Philly, has a concerning amount of Trump yard signs and "freedom warrior" vehicles. (Also Delco has dogshit public transit and sucks overall so don't live there, lol.)
Within the city proper, rainbow flags abound. The areas around the 3 main colleges (Temple, Upenn, Drexel) are likely rather safe for LGBTQ+ people at the cost of having to put up with annoying college kids (I mean, seems like a fair trade to not have your life threatened but just be warned they are very annoying, especially at Temple). Also slightly inflated rent, since landlords these days just assume every college kid has a rich parent to be their guarantor. Again, might be worth it for safety.
Lmk if you have other Philly-specific questions. It's honestly a very decent place to live. Don't forget to visit the art museum because holy shit there's so much cool stuff in there. Also thanks for being a teacher in literally the worst county and time period to be one. You're out here doing the lord's work fr