Unless it’s been boring for a good while, then it’s probably time to dump it for something else. But I found I tend to start skimming when I’m not really focused on reading a book.
One thing that helps me fall back into a narrative or idea structure is to consciously slow down, wringing nuance and understanding from each word until I forget everything but what I’m reading. This helps re-focus, and if you’re not getting lost, metaphorically, you’re Somewhere Else.
Now apply the same principle to your work. Slow down. See if that lets you re-focus and lose yourself.