It’s not an RPG, but I think Owlboy handled it expertly.
Each level, Owlboy is out to handle some dangerous issue that is happening. By the end of the level, he succeeds.
The thing is, in the background, other things are happening. Almost every time you “succeed” the story moves forward to tell you, “oh, while you were doing that, THIS was happening that made all you just did basically pointless and we’re all even more screwed than before you started this level.”
So, it keenly points out the enemies aren’t waiting around, in fact, they’re doing dastardly things while you’re busy trying to save the day, so much so that your character continues to feel like a failure despite many successes. I think it’s a great way to present and write a story, to show that your character isn’t the only one in the wider world that things are happening to and can’t handle all problems at once. Things happen outside of their control and outside of their vision, just like in our real lives.