A wandering mind during a film is extremely common, and it is usually nothing more than ordinary inattention. Occasionally, though, it points to something worth looking into.
Almost everyone drifts a little. If nobody ever did, nobody would walk out of a cinema confused about the plot or realise they had missed an entire scene. Attention is not a steady beam; it pulses, and long stretches of passive watching give it plenty of room to slip.
When it happens in a dark theatre, on a huge screen, with no phone and nothing else to do, and you still come out having lost whole scenes, that is simply what an unoccupied mind does. It fills the space with its own material.
If the difficulty is persistent and genuinely disruptive rather than occasional, attention deficit disorder is one possibility. People with ADD find sustained focus hard and describe their thoughts as constantly moving. Substances, including cannabis, can noticeably amplify the effect, since concentration is much harder while intoxicated.
The practical advice is straightforward. If this is a recurring problem affecting work, study, or daily life rather than a passing annoyance, speak to a doctor, typically a neurologist, a psychiatrist, or both. Self-diagnosis from a description on the internet is not a substitute for an assessment.