There are a few instances I saw in some shows, where a character notices they are stuck in a doomed timeline, where nothing could have been changed, like perhaps no matter what they do, they are doomed to die. But for some reason, they managed to avoid that ending. Whenever that happens, I always question, "How?"
This scenario is kinda like a story in a media like a show or a video game with limited endings, there isn't anything the characters can do to change their outcome, even if they become aware that there are just characters being controller by higher beings, their fate has been set, and their existential crisis is part of the script. It is also a question I ask myself a lot, is whatever I'm doing right now planned by a god? Is the thought I'm thinking planned by them too? And no matter how much I try to defy their script (like walking somewhere I don't normally go), is this all planned?
For the miracle that characters can break through the set fate, the normal answer is just the story's lesson is as soon as you have the will, you can change your destiny, though this answer is a bit cliche. But if we try to exclude that answer, maybe there are other explainations.
The biggest reason I can think of is there are outside interferences. Assume if you let a computer run a set of code, every time it runs, the results should be completely the same. That is what should happen to timelines normally. However, when some guy comes in and modifies the code, the results will be different. Applying this idea to timelines, when a god decides to come in and change the story because "it needs some more spice" or whatever, it probably gives a chance for the characters to do something different. There's a meme where a time traveller does something really small (like moving a chair), and the whole story changes, perhaps even the smallest influences can change the outcome a lot.
And this idea is a bit more special, as it requires the storyline to be a bit more flexible. Another possibility for the characters to break through their fate is that there are enough random varibles in the story to help them.
There is a worldbuilding idea I have that gods create their own universes with stories, like how we like creating OCs and worlds. However, it would be quite time-consuming and annoying for them to write every single detail down, like do you care what your OC eats in each breakfast, lunch, dinner and snack in different days? So for these trivial details, they simply let them thrown in the random generator, to help them build tiny world details, or create background characters, or determine how many chairs there should be in the classroom.
But maybe, if the randomness comes together just right, things can change. Maybe the protag is doomed to be sacrificed to a galactic beast to save the world, but perhaps the characters can find a random apple in their lunch, and accidentally drop the apple in a street, the guy responsible for summoning the beast trips on it, and that delays the timing for the beast's appearance, and that gives the characters time to stop the guy from summoning it, and thus, saving the protag's life.
This is a bit of a dumb example, but you get what I mean, something something butterfly effect.
I'm trying to build on this idea more, but I'm not that smart, so it is taking a bit of time. Hope I come up with something cool later on.