Socializing with colleagues is an extremely important part of the job when you are in a company.
In that regard, being on-site has an edge.
But it doesn't have to be a full "return to office" to achieve this. You could make it that there's an in-person meeting that people show up for periodically. Like you could designate say, a meeting at 2pm on Wednesday. For that you don't need people to show up at 8AM and work to 5PM in the office, you just need people to gather. Chances are most people will start showing up from 1PM onwards and likely after the meeting ends, you'll hang around for an hour chatting.
That gets rid of the whole commuting problem - why rush with everyone else to get to the office at 8AM when I can go out for a lunch (perhaps with colleagues also attending the meeting), then go to the meeting. After the meeting then catch up, and then depart whenever.
Heck, have the meeting at 11AM, and people can start heading in after rush hour is over, then catch lunch together as a group and then go home at the end of lunch.
You can get the benefit of face of face without demanding people spend 8 hours of it together.
Additionally, beyond a certain size of company, RTO doesn't increase collaboration because at that point, it's too big. For a small and medium sized business that still fits on an office floor, OK. But once you span two or more floors, or multiple buildings, the benefit vanishes. No one is walking up or down multiple floors, or worse, across campus to meet face to face with someone else - at that point it's pull up the chat window and ask them, or send an email.
I've had to start a new job, and it's been over 6 months. I barely know the people in the cubes around me - we don't interact because we're not on the same team. At best we've chatted casually about nothing in particular, but the minutes of that would probably be in the handful. The team I work with is down the hall due to space issues, but I don't need to talk with them either. My current task has me working with people across the floor and multiple floors so it's mostly just a Teams chat window.