From the "Opportunity Attacks" section of the Combat chapter:I don't know about that, when the mount uses the disengage action it only prevents opportunity attacks against it. If the rider doesn't also disengage then I would still swing at him.
"You also don't provoke an opportunity attack ... when someone or something moves you without using your movement, action, or reaction."
When a mount moves you away from an enemy, it uses its own movement (and no action), not yours, even if you are controlling it.