Apart from anything else, JKR just really isn't a sci-fi/fantasy person. She's openly said that she's not into fantasy.
She's a mystery and adventure writer who just happened to have an idea based in a wizarding school.
My brother has written a story about a boy wizard at a boarding school. He pre-empts the "HP rip off" jokes by getting in there first. My own fantasy novel was influenced and inspired by Brexit, but also my history degree. But it's not an allegory or a retelling. It looks at populism, nationalism, trade - but centres on the personal relationships. It even starts with a bloody pandemic, and the debt ramifications of that - written in 2016.
Shakespeare wrote this in 1605:
"Love cools, friendship falls off, brothers divide. In cities, mutinies; in countries, discord; in palaces, treason; and the bond cracked twixt father and son."
It's practically my synopsis!
It really is the shallow end of the pond to consider things as "rip offs". There's nothing new under the sun.