But whether you're in the office or not while writing that code is completely orthogonal to whether you have the context & requirements to do it. A good organization that's built for remote workers can communicate all of that without people having to be together in person. Likewise, a bad organization will have bad development & requirements practices whether you're in the office in person or remote.
The big difference is that it's easier to ignore distractions when you're remote so once you have your work (mostly) defined then it's easier to get into flow when you're by yourself.