It can go either way, but I think the direction is determined by how open & vulnerable the unfaithful spouse is willing to be. This can sometimes take a long time, even years, for some until they begin to have more honest considerations about what really happened and their responsibilities for the damage that was caused. That's when a new kind of healing can begin, even if the marriage already ended.
...Once the AP is no longer around and reality sets in does the WH tend to keep their rewritten history or do they finally see the history they rewrote was a way of justifying their actions and more a reflection on their emotional state of mind and feelings leading up to and at the time of the affair than the actual fact of reality?...
But some never get to that point. They have constructed an explanation that minimizes their responsibility and avoids shame. That explanation serves them well enough, so why mess with it? Of course, they give up their chance for significant change, too.
Let me just add that the unfaithful spouse isn't the only one who rewrites history. Both partners often reinforce their versions of the marital experience (the unfaithful spouse seeing it as worse than it was, the betrayed spouse minimizing the real problems that existed). The more honest both can be, the better their relationship renewal will be as well.