Unless the frustration led to bad performance reviews, which could have happened.
My mental health would have suffered, but holding on another 1-3 years would have probably led to me being 5 years closer to early retirement.
It was also 2021/2022, when the job market was completely bananas. The temptation to leave and get a decent paying remote job was very high. And at the time I felt Google was doing a very poor job of remote work, at least on the teams I was on. And they made the hybrid in-office unpleasant (floating desks, nobody else there, just a weird vibe).
Hindsight 20/20, etc.