I quit my last job because management wanted us back into the office at first one, then two, then three days a week - all so that we had to commute into an office pointlessly and then either spend the entire day on Teams calls, or just sit at desks writing exactly the same code that we would have at home.
When I accepted my new role, I made very sure that my contract of employment was explicitly set up for full time remote work only.
I wish the best of luck to anyone attempting the same switch at the moment, the job market in general (and especially in tech) is in a crazy situation at the moment.
My old boss actually thought it was a waste of time bringing everyone back as well. This was a big enterprise, all the RTO orders were coming down from the C suite and senior leadership.