Yup! This is called having a steadfast character when it’s in the hero’s role. I happen to have one, so I defend it more than others might =P
A steadfast character stands justly in the face of an unjust world. The world opposes the hero’s virtue and morality and changes due to the hero’s refusal to conform to the world.
This does not preclude character growth. It’s not a terribly noteworthy example, but Thor in Thor: Ragnarok is this sort of character. He starts off the movie telling Surtur he will fight the inevitable end of the world “because that’s what heroes do,” and spends the movie convincing others to change and align with this worldview. Thor himself changes a little bit as he learns his goal of “save Asgard” refers to its people, not the land itself.
We modern readers generally prefer nuanced characters who change heavily over the course of the story, but that doesn’t mean we shouldn’t use steadfast characters. We just need to provide enough sub-arcs and other dynamic elements it doesn’t look like we’re writing flawless Mary Sues.
BTW, a steadfast character isn’t a flat character. Flat characters are just predictable and without nuance. Adding conflicting and complex traits that make a character act surprisingly in different circumstances can combat the potential flatness.
"...the one with whom he so sought to talk has already interceded for him." -The Master and Margarita