Moving it out of Hogwarts would have made it less appealing to much of its audience who pretty much just want to live out their fantasy of being a student at Hogwarts. Something it did delivered on successfully.
All the browns in 1800s Europe really bring the immersion down, and that's before you get to the tranny I don't think anyone liked. No, I think that Hogwarts Legacy is just low effort slop that only cashed in on the brand name and the tranny controversy, nothing more. It got lucky.
An actual student simulator in Hogwarts could have been neat, and I feel like the timetable for that is slowly going away as the fans of the books/movies are slowly growing old and every year you lose potential audience. I have no clue how popular Harry Potter is with kids nowdays but they are nothing compared to the nostalgia chasing adults who grew up with the initial Harry Potter mania. How a game like that would look, I have no clue, but between all the existing HP games out there, I think the tools and pieces are there, you just need to mix and match them in the right combination.
In somewhat related news, there is a bizzare new game related to Harry Potter being developed
This isn't an official Harry Potter game, but if you played the old console/PC titles for the original movie trilogy, you will feel right at home. The game is an immersive sim and the entire premise is about breaking the game. That's right, the dev expects you to get out of bounds and break the economy of the game, and the developer? The same guy behind DUSK, altho he brought his brothers along for the ride. They develop games too, so this isn't surprising. If you liked Cruelty Squad and the old Harry Potter games, I think you will like it. The game is in early access right now, but there is still plenty of content, and it also has multiplayer. Definitely a purchase if this looks even remotely interesting to you.
If I am looking for a Harry Potter game, this is more like it, not Hogwarts Slopacy. It's a good start, a good base, but it definitely needs a sequel to flesh things out, it is very mediocre as is and would never stand a suspect test if not for the big IP it represents. I know everybody looks for something different from a potential Harry Potter game, but as a video game itself it just isn't very good, that's a fact.