I used to get that during my later school years. I couldn't keep up the effort of turning the words of a novel into thoughts, and I'd have to keep going back every time I realised my mind had wandered. It got a lot better but I don't know how. Possibly linked to my being more free to choose the books I'm naturally interested in now.
I have trouble learning the characters' names so I soon lose the plot if there are many of them. That was happening with a novel - but when I deliberately found and wrote down each character's name and relationship to the story, and then made a bit of effort to memorise them, I was able to read the book fine.