My little dog is the worst/best boss. He yells at me when it's time to start the work day (he sits on the bed behind me like the lazy freeloader he is). He yells again at lunch (he needs to pee) and at 5pm (he needs to pee again). The only problem is he doesn't understand Saturday, so like clockwork, 8am Sat morning, yap yap yap, go to work.
Real answer: Get up and walk away.
If the apartment is small, walk down the hall or around the block. You need an actual mental break from work. Once the walk is done DO NOT START WORK AGAIN.
I find I actually have a better balance WFH, as now I don't work past 5, I just get up and walk away (unless there's something that's actually critical).