I suppose Orson Scott Card has been as thoroughly cancelled as a bestselling author can be, and I could easily think of other male authors who've been subjects of controversy or had their reputations posthumously trashed (sometimes deserving it, sometimes not).
But JKR seems to attract a special kind of venom. And downstream of her, it's female authors who have lost work simply for saying that sex is real.
I wonder if some of that, paradoxically, has to do with how female dominated the publishing industry is these days, and whether that creates pressures towards ideological conformism. YA publishing in particular seems to be an absolutely miserable place, with authors living in a constant state of fear because they never know who's going to be denounced next for thought crime. About twice a year authors are invited to sign yet another open letter calling for even more censorship and denunciation.
(There's one particular author whose name is always near the top of those open letters, who many years ago earned a reputation in Harry Potter fandom as a vicious bully.)
It might be that the residual straight male authors, working in low-status genre ghettos like spy thrillers and military sci-fi, are just able to keep their heads down and avoid all this Mean Girls crap.