What's the word or phrase to describe this behaviour?
Solution 1:
In psychology, it is called hindsight bias. (also known as knew-it-all-along effect or creeping determinism).
The hindsight bias is defined as a tendency to change a recollection from an original thought to something different because of newly provided information. wikipedia
Solution 2:
This is perhaps not as specific as you'd like, but what the woman essentially did was
backtrack
1.1 Reverse one’s previous position or opinion
or
back-pedal
Reverse one’s previous action or opinion
You might phrase it like: "The woman blatantly back-pedalled."
In an open and unashamed manner:
(Oxford)
PS - Back-pedalling is not a perfect fit here; as the woman is hoping no one notices and gives her credit for Z-line. This isn't implied every time someone back-pedals