Hogwarts Legacy is part of the Harry Potter universe, created by JK Rowling. Although JK Rowling wrote the books and had a major role in making the movies, that doesn't mean she is a part of every single project.
JK Rowling is not helping in the development of Hogwarts Legacy, but she is still going to earn royalties from it. Rowling owns the IP to the Harry Potter universe, so any game, movie, or book based on the universe will be profitable for her. The fact that she is receiving royalties on Hogwarts Legacy does not mean that her alleged viewpoints are enforced.
Hogwarts Legacy's developer Avalanche Software is making it very inclusive, despite accusations that JK Rowling is anti-trans. The game allows players to create transgender characters (thanks, Bloomberg). They are using the Harry Potter world, but the devs do not seek to discriminate or make anyone feel inferior. For a look at what players can expect from Hogwarts Legacy, check out the gameplay reveal trailer via Warner Bros. Games' YouTube channel.
For more on Hogwarts Legacy, including The Golden Snitch spotted in Hogwarts Legacy trailer and What ghosts are in Hogwarts Legacy? Stay here on Pro Game Guides.