I second Gideon the Ninth, This is How You Lose the Time War, and Iron Widow. All excellent books for very different reasons.
Peter Darling by Austin Chant is a lovely novella if you're interested in a Peter Pan re-imagining/sequel where Peter is a trans man and gay.
The Honeys by Ryan La Sala is an excellent horror centering a genderfluid protagonist. Be prepared for some transphobia from antagonistic side characters though.
The House of Shattered Wings by Aliette de Bodard is the first book in an alternate history series with fallen angels and Vietnamese dragons. It deals with themes of diaspora. Several of the main and supporting characters are gay/lesbian or bi.
The Tarot Sequence by K.D. Edwards is an alternate earth series where there are anthropomorphic personifications of the major arcana in a tarot deck, though you might want to check content warnings given it does deal with some dark themes. The main character is gay, being bi is considered the norm in that society, and more LGBTQ+ characters come into the series in later books.
Not a book, but if your interested in a full-cast, narrative podcast Juno Steel on the Penumbra Podcast is amazing. It's sci-fi noir detective with a fair bit of humor, though it gets more serious as it goes. It's a world where being queer is regarded as the norm, no one ever gets misgendered. The main character is bi and nonbinary, and the cast is filled with a variety of other LGBTQ+ characters including at least one who is ace/aro. They're on the fifth and final season now.