Eventually that person couldn't be standing behind you making sure you were doing your work and at that point how did you make sure you were being productive?
I don't have a great answer for that, as it's still something I occasionally struggle with. I try to pick work where I can closely collaborate with another person. It sounds silly and maybe a bit childish, but just knowing someone else will be happy/proud when I finish a task helps a lot.
Not the person you replied to, but I've had similar experiences. Just having another perspective to compare to can help. If I've had a good experience, I can tell when I'm not there. That's often enough to close the gap.