However, most of the folks complaining about return to work I've noticed are senior people who have enough skills to perform their job and don't require constant attention. What I've noticed is these kinds of workers absolutely thrive remotely, however younger employees greatly benefit from in person learning and mentoring.
I've personally worked with many junior engineers over the years and it's really hard to mentor someone over a computer screen. It's definitely possible, but being able sit down informally and talk about something that's hard to understand, or unclear is much harder remotely.
I haven't figured out a virtual way to give an intern a small assignment and determine if they're struggling remotely (yet) short of doing peer programming. If I ask an intern to fix a bug that's 2 lines of code and I hear furious typing over the walls for extended periods of time, that's probably a good time to ask how it's going and offer some help.
I don't have the answers here but I don't think it's fair to be so dismissive of face to face time in the office.