So, This happens.... Especially for my teenage son.
We started using the Pomodoro Technique to help
break away. Set a timer for 25 minutes and do only
the task at hand during that time.. then time a 10 minute
break. Keep going that way until the work is done...
It really helps to keep the focus on your work
and not all the other fluff.