From the short periods when I have worked in offices in-person, you are correct that the lion's share of the time is spent working alone on projects just as it is when working from home. However, where I did internships, I made friends among my colleagues and would eat lunch with them (and Fridays everyone went to the pub for a longer lunch); further, people would talk to each other in passing while we were working and there was a distinct feeling of "collective enterprise" and solidarity that helped to push through the inevitable tedious aspects of the work. Even though the socialisation wasn't often at all work-related, it made the work easier and more enjoyable. I do accept that this argument is dependant on working in a company whose social culture is suited to you, which is not easy to find.
All that said, there is nothing that can compare to WFH for "deep work," where you know what you are doing and just need time to get on with it withoug anyone breathing down your neck. For that reason, I don't think I could ever work full-time on-site and would always aim for a balanced hybrid model, if given the choice.
I guess a lot of it comes down to solitude vs loneliness: the line between the two can be distressingly thin.