So much this. As a practitioner of modern stoicism, the idea that my productivity should be tied to external influences is anathema to my philosophy.
Working from home and having three kids between 6 and 10 months, the onus is on my to manage my expectations and my spouses expectations for when I'm going to be working, what work is interruptible, and what's most important to me. Given that my priorities go: family, friends (spouse included here), work, volunteering, that means that if the family isn't functioning well, that's where my attention goes until we're in a good place.
I've seen a lot of people either neglect their personal priority list or simply not have one, and then wonder why their life is falling apart around them, or they from time to time feel void or uninspired.
All this to say, productivity for productivity's sake is the behavior of cancer. If I have an un-productive day from a work perspective, it's usually because I was tending to higher priorities in my life, and thus it is hardly the end of the world, and I make a plan for getting things back on an even keel there so tomorrow or the next day I will have a more productive day, and make sure to communicate this to my supervisor in my next 1:1.