Steps to reproduce (a video is attached):
Open the world provided here: https://drive.google.com/file/d/1_S97yI28sMjX0Xf63NP9lwPseqIaAxpz/view?usp=drive_link
Spawn a horse-like entity (horse, donkey, mule, skeleton horse, zombie horse), an iron golem, polar bear, slime, sniffer, turtle or camel anywhere in the enclosure.
Use /tick sprint and lower render/simulation distance to accelerate the game so you can see the bug occur faster.
❌ The entity eventually jumps into the lava, killing itself.
This does not only occur with /tick sprint (if that is someone's concern); I found this bug at random when I saw horses jumping into lava from the corner of my eye.
Can confirm.