This still needs a lot of work, but I don't think it is quite as bad as it was 25 or 30 years ago when people were literally shut up when they even mentioned certain topics rather than merely criticized. A white person could casually discuss something to do with Black people and the Black people, say on a campus would run away, hurt and screaming, to a designated "safe space" to recuperate from the "damage" they incurred from those words.
Yet we have authors like Samuel Delaney and Ursula K Leguin who were writing in a diverse manner for decades and I don't recall any of their books being burned or banned. It is a strange world where only an Asian can write about China, or an African about Africa. On the other hand, a sad world where they could not.
As a self-published author, I have run into this problem writing about a trans woman as a central character (obviously--I hope--I am not a trans woman). I have struggled to keep her real without having to deal with too much criticism. I have received complements from some in the LGBTQIA community as well as some harsh words. This is to be expected, particularly these days when the internet has turned everyone into a "writer/critic." Writers have always had to develop a thick skin about such things and look for those other writers and other friendly voices for support. You'll never shake yourself loose of negative words if you put yourself out in public. And you'll never get anywhere as a writer if you don't.
So, chin up and write on. Make things as real as you can for yourself and the reader will come along with you.