I just love this trope when done right. Characters who might complain, and brood about their circumstances, but ultimately never turn away from the “with great power comes great personality” line. Who might have the temptation do morally things, but have the strength of will not to.
My favorite examples are Harry Dresden from the Dresden Files, and Sam Vimes and Granny Weatherwax from the Discworld series. But I’m open to any work from any genre with your favorite examples of this.
I do get that on the surface this seems like a pretty common kind of character, but in my opinion nailing the middle ground between the antihero and the Paragon is a lot trickier than it looks. But they are undoubtedly my favorite type of protagonist.
Bonus points if your recommendation features a strong focus on relationships between the characters.