Office or remote?

The pandemic showed that software engineers can work productively from home. But most of us have also realised that working remotely is hard to sustain as a healthy business operating model. So what is the recipe for success in post pandemic software engineering?