Queer and trans narratives are so often revelation narratives that it's easy to forget there's a lot more to our lives than that.
The question is how to go about writing characters who aren't like you, not whether you are allowed to.
It's challenging to have the desire to create works that cause minimal harm, paired with the certain knowledge that our writing incorporates our ignorance and erroneous beliefs.
Draw on the best of the way the world is and has been, as well as your most optimistic hopes for what it could be. The real world is very unfair to those on the margins. Use your writing to make up for it.