the bank I worked at had garden leaves and non-competes but differentiated from being fired, quitting for another job, retiring, and job elimination.
Never heard of a 4 year non-compete. Usually they're 6months to a year. Also, on boarding at a new firm takes while or even setting things up if you decide to start something takes a while. So you might be able to do that during garden leave. Either way if an employee leaves and tries to do something they end up getting sued.
I think in California Big Tech had a lot of companies in these contracts and in 2011 I believe they lost a big case here it was deemed nullified. I think a few years later California codified it by making non competes unenforceable. Of course it didn't help their case when Big Tech was also colluding to not hire competitors aka Salary Collusion. Even Steve Jobs plead guilty to Collusion. That's also how famed labor lawyer Marvin Mitchelson was able to sue the MLB and usher in Free Agency in the 1970s.