I gave up trying to work from home and commute to the office as an essential worker, because the distractions were so frequent I was not getting much work done. I'm the only person in the office and it is night and day for my productivity.
At the end it is about finding a place without distractions. Not every home is prepared for that (and sometimes even impossible, due to kids, for example). But it is not the office per se which I claim that tend to be really disruptive in general.