The sweet spot is don't force people to work a certain way. I was in an open office place before 2020, was remote friendly, we mostly would come in except when we needed personal time or whatever, but if I wanted to focus, I'd pop in headphones and crank out code, as would anyone else. If I wanted to peer program I could, and if anyone wanted a quick laugh, we'd just talk for about five minutes, because sitting staring at code non-stop in an office environment can be draining too. I prefer WFH, and I can peer program with devs by calling them on Teams and screen sharing, but if I have to be in an office, it wont make much different to me, just the risk / wasted time from the commute.
I love WFH for this. It’s so much easier to plan my day according what best works for me like focus moments and current environment. We still do all the meetings and pair programming is so immensely better over a call with screen sharing.
All the energy I’d normally expend on “shielding” myself from the office environment can now go into focus and actual creativity.
I think the sweet spot is, let teams decide how often to meet if you're going that route. For example, last place I worked at we were mostly from various parts of the states, so we were considered remote, whilst others lived nearby and had to commute. I think managers should decide wholly how their teams work. If managers need to be onsite, that's reasonable too, though I would assume not always especially if their teams are remote.
I feel like the less technical teams might benefit more from face to face, but developers, a lot of us do our coding at home before our careers even start. It is a hacker's career path.