[Yes, I'm subtweeting Amazon]
It is incredible to me how poorly Big Tech is mismanaging the so-called "return to office." In every team I've worked on, pre-covid, the metric was "Did you get your work done?" and nobody measured how often you were in the office, because how often you're in the office (in software development) is an unimportant metric.
Post-Covid (don't @ me) we now see companies pouring all their attention and focus on putting butts back in office chairs. I'm willing to believe that tech companies have secret metrics showing that in fact people are slacking off when not in the office and everyone is less productive (although it sure is mysterious that nobody SHARES those metrics). But then the solution to that is to set concrete productivity targets that are based on what you're trying to produce, not "we want to increase our measurements of butts in chairs."
You get what you measure. If your priority is having more butts in chairs, you will get more butts in chairs, and will get zero productivity improvements along with it. If what you need is more worker productivity, decide how you're measuring it and then set those targets directly, instead.