I think what makes a hero interesting is their journey. Characters who are perfect, I frankly, almost always hate. It's the character's personality that makes them stand out, and their flaws that allow us to get attached to them. No one can relate to being perfect. For that reason, I think a lot of my 'heroes' at least in my stories released so far, are an odd slurry of hero, anti-hero, and villain. They are human, so not everything they do is good, or even well-intentioned.
What ultimately makes them people I would consider heroes is that their overall desire is to do good, whether or not they always do.
An anti-hero is one who tries to do something they overall consider good in a method they know is not the best way (again, in my opinion)
A villain is one who knowingly makes decisions that are wrong with no intent or desire to do or be better.
To be honest, I think a lot of my leads have anti-hero moments, but the one who is probably closest to this is Mora Glas of "Crystal Blue." She doesn't want to cause others harm but is willing to do so for her own safety. This valuing herself over the life of multiple other people's I think is an antihero mentality, but her sense of fairness that leads her to not WANT to be this way keeps her from being fully villainous in my opinion
Idk if you've ever read my story, so you're the only one who can judge whether a hero has successfully been made interesting in your opinion or not, but each of my leads has a number of flaws in combination with their good traits to help them feel more real and human.
None of my leads are perfect people, and many of them spend as much time doing good as they do bad. Trying to itemize their flaws versus good traits and good moments versus bad ones could make this really lengthy though, so I won't elaborate unless you're interested lol
Edit:
the only morally perfect (as far as anyone has gotten to see) characters I think I've managed to write who I still find interesting are both part of my novel "Damsel in the Red Dress" and I make them interesting by giving them other flaws and quirks that have nothing to do with morality. Melissa Xochitl is a hyper-active little ball of sunshine that my readers love, but it's her rambling nature that never lets anyone else get a word in edgewise (accidentally) that makes her so interesting, along with her little faux pas, like not realizing that squirrels don't eat lettuce and things like that.
Andrew can't gauge his own strength and sometimes hurts people accidentally, as well as being a little annoying to his best friend and older sister at times. He also has trouble reading, which makes him more human. He's "good" but he's still not perfect. He's also part of a character duo and spends almost all his time with his best friend who is so politically INcorrect that Andrew has to try his best to balance him, adding life and dynamic to his character.