This might be related to or duplicate of
MC-12569 but this bug is kinda different.
While on a minecart, you are too low. I have attached some pictures of this.
Hope you can reproduce and fix it because it's pretty annoying.
MC-19331 You can glitch into a Minecart if you get in it on a slope