Whatever one may think of the author, the work now stands or falls on its own merits. In the case of the Potter books, the themes of friendship, inclusivity, courage, doing the right thing and self-sacrifice shine through the mediocre writing well enough to inspire generations of kids. No bad thing. Authors often write things that do not necessarily reflect their personal views, and many authors whose work is widely admired almost certainly held views that many would now find repugnant. For instance, almost any European writer up to the middle of the 20th Century is likely to have held racist views - not out of personal evil, but simply because these views were prevalent and usual in society at the time.
In the matter of Ms Rowlings' attitude, I see two threads.
One is simple stupidity. JKR publicly complained that the author of an article had used the term 'people who menstruate' as opposed to the word 'women'. Now even I, as a mere male, am aware that not all people who mentruate are women. My daughter started menstruating at 11. she was not a woman then, but a child, a pre-teen. Even so, she needed -and fortunately had access to -safe and hygienic spaces in which to manage this function. So my first reaction to the furore, after having read both the original tweet and the article it referred to, was "Woman's as dumb as a bag of rocks!"
If at that point JKR had put her hand up to having made a stupid comment, the fuss would have died down. But she didn't, and this is the second thread. She's scared. It seems that her early life was far from idyllic in some respects, she has been a victim of sexual assault, she had a failed marriage and has experienced the difficulties of being a single mother. She has probably acquired a subtle form of PTSD. Anyone who , in the 1990s, could be as prissily naive and clumsy regarding the romantic and sexual behaviour of teenagers as she seems, anyone who could invent the Dementors despite such clearly limited intelligence, must have issues around sex and bad memories.
Thing is, Ms Rowling, you can make all the laws you like, but short of posting a security guard at every ladies' loo to inspect peoples' bits before they go in, there will still be no way to stop a man putting on a wig, makeup and a frock to get into said loo intent on rape. Your best course of action is to study self-defence, not rail against transgender people.