And no, these creators are never at risk for creating gay content.
The most they risk is becoming millionaires if their work is a huge success. XD
A series I really love is Mo Dao Zu Shi, it's xianxia and it's very gay, with extremely explicit descriptions of gay sex. The original novel was published on an online platform in 2015 and then printed as paper books in 2016 and reprinted in 2018. The ongoing manhua adaptation (started in 2017) is so popular it was awarded the Best Manhua award at the Golden Rooster and Hundred Flowers Festival. The audio drama based on the novel aired in three seasons from 2018 to 2020 and has such massive popularity (hundreds of millions of playbacks) it's still today in the top 3 most listened to series in the overall ranking for audio streaming websites. The anime adaptation also has three seasons (plus a Q spinoff); the third and final season aired a few months ago, from August to October, and of course the two mcs are just as gay as in the novel and get their happy gay ending in the last episode! (Squee!) And there's a live action series as well, 50 episodes of 40 minutes each, which was filmed in 2019-2020. I've found it on Youtube and just started watching it, it seems very well made and I'm liking it a lot! (Tho I'd say... Wangji's actor is too much of a pretty boy, he should look more strong and manly!!!)
This, I think, is a good example of how gay stories are not only quite common in Chinese media but also hugely popular—and widely acclaimed!