Technically, her cover was "compromised" by Aldrich Ames. She was brought back and they dealt with her cover being compromised at that time in regards to any overseas operations.
She remained an undercover or covert employee. That status isn't determined by your job or where you are or what you're doing. You just are or aren't, according to what the agency designates you.
That she was compromised by Ames or she ceased doing covert work overseas does not necessarily mean she was no longer an undercover employee. But it's significant because it nullifies the histrionics of those who know better when they go on and on about the danger this put on employees, operations and foreign sources. Having already been compromised by Ames, she would not have been part of any operations that would need to be protected by the statute.
She was still undercover, but that was simply her status as an employee. She could have spent the next 20 years as an undercover employee never doing so much as writing a letter under a pseudonym.