Its not safe to be queer. There are broad societal protection that one loses out on the second they aren't straight acting and cis-gendered, all it takes is a shift in the political winds for governments to start rounding up any class or minority they don't like. There are "safer" places in the world to be queer, but the threat of danger and violence never goes away, even in gayborhoods like here in parts of Seattle.
What you're saying may well be true, but it has no bearing on the case in this article. Based on the article, it appears that the author wasn't jailed for writing gay sex scenes, but rather for selling books with sex scenes of any kind . Apparently China has a law against selling pornographic books of any kind, and this author ran afoul of it.
All over the world, sex-negative laws are disproportionately enforced against queer people (and specifically queer people of color). Sure, the statue here applies to all pornography/erotica, but that doesn't negate OP's point that it is not safe to be queer (or to produce content targeted at a queer audience).