Back to Sisyphus.
Harry is not actually the real Harry Potter.Voldemort, due to having split his soul so many times and with other dark rituals he performed on himself, cannot simply just die as anyone else can. After being hit with his own rebounded curse at the end of The Deathly Hallows, he awakens as Harry Potter on his eleventh birthday with no memory of who he was, but has most of Harry's memories. The entire world he is in, and everyone in it, are not real... he is in a hell of his own making by being forced to live as his worst enemy for eternity, though he will never know it. He is so badly damaged that he is forever trapped at the line between life and death, and this is why 'Harry' keeps looping over and over. Voldemort has indeed achieved immortality, but not in the way he wanted.
Harry will be free only when he gets it right.Reliving his life the same way? Not getting it right. He has to actually ensure the survival of every positive character from the books. Harry's main obstacle is giving up too easily. He gets attacked in an alley by a werewolf and then gives up. What he's supposed to do is live his life exactly the same way and go back to that alley until he beats the werewolf, no matter how many tries it takes him.
The final life where Harry seems to get it right but still fails is the actual series.We just read it from the perspective of Harry in self-denial.
This story is a metastory about Harry.This is what the world looks like to Harry Potter from within fanfiction: every time someone writes a fanfic, he is forced to live his life again. The lives in the stories are just the fanfics closest to the original, with the original Harry. The apparent constraining rules are the limitations from the actual series.