“I saw very little work being done”
That’s an incentive problem not a “be in the office” problem. Or you’ve hired lazy bums. Or the work isn’t interesting enough.
If the people are screwing around then fire them. More than likely the job is dull or not challenging or not rewarding enough. That’s a call for the company to step up their game and bring in A level talent.
Or don’t and keep on getting the C team that’s only doing busy work as a boss is looking over their shoulder.