Productivity is not progress, for sure. You can be very productive building the wrong thing. I've been there, wasting a year on some crap that was canned. But you need to be able to deliver and not actively frustrate your devs that want to get shit done. Otherwise the 'adapted to the market' is just a scam at best.
btw, not every dev is the same. Some actually do like being in the office, even putting on music and have lots of small talk. That's also fine, if it works for them. And I also see benefit of going to the office myself (once a week or so).
I'm pointing out the pattern of sales & management incompetently projecting their own needs and biases onto the whole company and treating devs as grunt workers, forcing them to comply with their rules and fulfill their needs regardless of how it impacts their ability to concentrate and deliver. Software development is not grunt work.
I see fulltime RTO orders as a reflection of this. Smarter management will understand what devs actually need and take that seriously. Usually this kind of management has a technical background. Office can be a part of that, sure, but wfh invariably is too, I'm convinced.
I've worked for dozens and dozens of managers in my career. Some will go out of their way to buy you the best laptop, even make you coffee and give up the best seat in the office just so that you can work in peace. Because they know that such investments in their staff will pay off. Then, others will loudly interrupt you, deny any small request out of petty resentment, and blame any and all problems on your laziness - that is if they actually show up to notice there is a problem.