"Maybe you should work to improve what you measure and how you encourage feedback. It is normally a good idea to have ways to tell if people are doing a good job for what you are paying them to do."
Measuring this stuff is really, really hard. If you're a manager who's non-technical it's almost impossible.
No-one is saying that you can't slack off while at the office, or that you are guaranteed to slack off if you're working from home, but I think the discussion would be better if some of the more rabid pro-remote people acknowledged that for a lot of people there is a big difference.
In the office: - You're limited in what slacking options are available - You're surrounded by coworkers who at least act as though they mostly work which can be motivating - You know your boss is around and could stop by, so you don't want to do something too outlandish
At home you could go play your xbox for 8 hours while responding to DMs, and then say "investigated the bug, think I made some progress" during stand-up and in many places get away with that for a very, very long time.
I don't think some lighter version of this is that uncommon. Sure, you can take the position that it's managements responsibility to figure this out and fire you but understand that this type of thing is why many companies are against remote, especially with how vehemently most developers reject any form of tracking.