I think it's going to be both different for different people and different for different types of jobs. maybe making web apps is not affected at all by work from home where as some other jobs, say game dev, where you'd like to tweak something and hand the controller to your partner to test immediately "does it feel better than the last tweak from 15 seconds ago?" is more affected by work from home? In an extreme example, I suspect people practicing to put on a live play together can't each do their role at home over video chat. Or back to games, I suspect adjust local-multiplayer gameplay is not something you can do without actually having multiple people in the same physical location.
As for different people, I'm way more productive around others than by myself. On a scale of 1 to 10, 10 being most productive, I'd give being around my teammates to be 9-10, being at a cafe with people I don't know around a 7. Being at home by myself varies from 3 to 10. Their are certainly spurts of productivity at home for me but there's also zero feeling of camaraderie which is something that gives me energy.
Maybe it's related to the similar feeling of watching a movie at a full theater on opening night vs watching at home on my large TV. There's an energy at the theater that's missing from the home viewing. Similarly, for me, there's an energy at work with teammates that missing from working at home. By that's just my experience with my jobs.