It’s more complex than that. You’re oversimplifying it and making out Homura to be completely innocent when she isn’t. But she isn’t super evil, either.
After a certain point, Homura’s intentions became corrupted and selfish. Her motivation after the original 13 episode series ended stopped being about “wanting Madoka to be happy” and became more about “wanting Madoka all to herself.” If she was really a good person, if she actually cared about what Madoka wanted (and the fate of humanity itself), she would’ve allowed Madoka to remain as a god and let humanity live in peace and free of witches, even if Madoka was no longer tangible/mortal and nobody else remembered her existence.
But as the movies show us, she didn’t do that. She became desperate to save and see and feel the only person who she cared about, and the only one who cared about her in return. You know that trolley problem where there’s two tracks, and five random people are tied to one track, while there’s one person who’s very dear to you on the other track, and you have to pull a lever and choose who to kill or save? Homura basically pulled the lever to kill the random people and save Madoka, but on a massive global scale.
And the thing is, even though that is the selfish choice, you can’t exactly blame her entirely. She sacrificed so much, going through a time loop of the same few months over and over for the equivalent of 12 years, just to save Madoka, and Madoka’s selfless wish rendered that sacrifice pointless. In sacrificing herself and ascending to godhood, Homura was the only one Madoka couldn’t save, and arguably even spited her (not on purpose, obviously). Because the only way Homura could be saved was by being by Madoka’s side, and that option was taken from her.
Homura knew her actions were wrong and selfish. She labeled herself as a devil for a reason. But she couldn’t bring herself to care. Not after everything she did to save her friend/love. She went insane from the torture she was put through during the time loops, also losing her innocence and youth in the process. She refused to go back to a life where she has to continue to suffer without Madoka at her side or a future to look forward to with her. She couldn’t stand it.
Homura loved Madoka so much, she would do anything for her. Unfortunately, she also loved Madoka so much, she would do anything for her, including some really fucked up shit. It’s this self-described “curse of love” that caused her to become a witch, to split Madoka in two against her will, to create a fake alternate universe inside a labyrinth just for them to live in artificially created peace together. Homura knew if Madoka ever regained her memories and found out what she did, Madoka may never forgive her or may even become her enemy. But Homura was willing to take that risk, as well as the risk of the Incubators reinstating the old Law of Cycles to make all magical girls into witches again.
Homura wants to have her cake and eat it too, by keeping the new Law of Cycles in place so witches won’t exist, while also keeping Madoka mortal, safe, happy, and by her side - and currently, these things occurring at the same time are not possible, as determined by fate. But Homura has never let any of that stop her before. She is determined to rewrite the laws of the universe and find a way to make it happen. (We’ll see how that pans out for her in the upcoming movie.)
In summary, I don’t think Homura is totally innocent or that she “just wanted Madoka to be happy” because of her actions in Rebellion. But she’s not evil either. She’s a sympathetic villain at worst, and a traumatized kid desperately trying to keep her friend while kinda fucking up the universe in the process at best. I also don’t think the franchise is trying to make some grand commentary on how society treats queer kids, either. Homura and Madoka’s dynamic and relationship is a very specific and complex one that doesn’t necessarily translate 1-on-1 to real life people and scenarios, even apart from all the magic stuff. Besides, the creators purposefully made it so the nature of their relationship is somewhat ambiguous/not clearly stated (even though we all collectively know they’re gay), and any queer messaging in the series is not upfront and center the way it is in other magical girl animes like Cardcaptor Sakura or Sailor Moon. I think the real commentary in Madoka Magica is criticizing systemic misogyny and how young girls in general are treated poorly by society.