I love working from home, and I have a very enlightened employer but I do have some sympathy with the companies that have a chunk of employees who just don't work when they're at home.
The situation in my company is simple to manage - we hire good people who are very capable and then trust them to get on and do the job. That works with the sort of people we hire and the sort of work we ask them to do. If they're at home we'll generally work just the same, because we're pretty well motivated.
Not all companies are like that though. My partner worked for a charity where maybe 2/3 of people worked exactly the same during the pandemic, but a good chunk (mostly of the lower level admin staff) didn't. Some of them were very unsubtle - they'd never answer Teams calls, and would return them half an hour later and never produced any output anyway. Some were more subtle like the colleague who'd log into Teams first thing and then go back to the Playstation for a few hours of the morning before actually starting work. Having these people in the office WOULD result in more work being done.
What we need is for these employers to be focusing on output rather than hours in the office. They are stuck in a mindset and approach that barely worked in the past where if you had someone in an office for 8 hours a day you'd probably get something out of them. If they focused a little more on what they were getting (and I don't just mean some basic metrics with no human insight) then we wouldn't need bums on seats and the people not doing anything at home would be pretty obvious.