[continuing derail - Jack Williamson isn't very well known these days except to people heavily into vintage SFF, but his 1948 classic Darker Than You Think is one of the influential genre novels that hardly anyone has heard of]
Thinking of Orson Scott Card, Ender's Game is a very different property and fandom from Harry Potter, but I suspect they have this in common, that, among the huge casual audience, they attracted a very devoted following of misfit kids who became obsessed with the books and developed a sort of parasocial attachment to the author. Anecdotally, lots of boys who were obsessive fans of Ender's Game grew up to be gay men, and somehow they never clocked that Card was a conservative Mormon with conservative views on sexuality. They were really shocked and heartbroken to discover that he wasn't their flag-waving affirming surrogate parent.
Card's beliefs are not JKR's, but there's a definite echo there of a certain kind of HP fan - you can see them on YouTube, they're still obsessed with HP well into their thirties - and they often grew up gay or trans identified, and heavily into all things "queer", and with what I think is a very superficial reading of HP that it's all about the special kid who's oppressed by bigots but finds acceptance with the found family who recognise his specialness.
A lot of online fandom culture is like that, it's just that we notice HP more because it's such a huge fandom. Sometimes I look at the Daria subreddit and it's got a definite element of posters who say "as a LGBTQWERTY kid in the late 90s this show was a lifeline for me" and who have an encyclopedic knowledge of the show but who are always bitching and moaning about how "problematic" it was, and speculating about all the characters who are "queer coded" even if they were straight in the actual show, and...
...I mean come on, these are people well into adulthood who are throwing tantrums about an animated sitcom from 30 years ago and how it doesn't affirm them in precisely the way they'd like to be affirmed. I hope to god none of them get jobs in the creative industries, or they'll be even more insufferable than the male TV executives who keep trying to revive Charlie's Angels because they got their first boner watching the original show.
[rant over]