It's been a known bug since 1.9: https://bugs.mojang.com/browse/MC-101247
They've never fixed it, but they've closed it and reopened it, which is common with Mojang. It's not assigned and unlikely to ever be fixed, like a heaping mountain of other major bugs.
I'd say it happens to me about 1 in 10 times I dismount. So annoying.
1
Hello my ign is McAwesome33 and i am 22 yo looking to join to an active realm with friendly players i mostly like playing survival i will be active