There can be two factors at work:
- intrinsic motivation: you care about a problem and are curious and have some drive to solve it. By not having an environment that pulls you out (i.e. colleagues leaving the office) one can get lost in it
- fear of being rated as unproductive: when not in the office, you might have the fear that your manage might think you are lazy or somebody else might outperform you or whatever and you want to be able to show results. That's the main thing you have to show. In an office scenario you would also have your presence "oh he did something" in WFH focus on result is higher.
One thing I try (sometimes with more , sometimes with less consequence) to do is if I receive a message late or see late commits or such i tell my engineer "you are working too long hours" to remind them that they don't have to work long and it's good to call it a day ...
My take on this, is if you want to keep working, after you've met your obligation to the company, why not just work on your own stuff? If you work on something that's "yours", there's a possibility of being able to earn more based on how much effort you put in.