Entities riding something don't appear riding anymore if you move away from them until the client does not render them anymore and come back. It is enough if it does not render the entity anymore / does not have it loaded, you do not need to unload the chunks. This is a client/sever desync.

You can see the effect for example when you're summoning a normal-sized Mob like a Skeleton or Zombie as a passenger of something. He will then sit visually. If you go away until the mob does not render anymore and then go back to him again, he doesn't appear sitting anymore, although he is still the passenger of the other entity. You can also move the boat around and the riding entity will stay floating in the air and not move at all.

Here a quick test command with a Skeleton sitting in a boat:

/summon Boat ~ ~1 ~ {Passengers:[{id: "Skeleton" ,ArmorItems:[{},{},{},{id: "minecraft:stone" ,Count:1}],PersistenceRequired:1b,NoAI:1b}]}

Another example is FallingSand as a passenger of an an ArmorStand. If you unload them and go back, the FallingSand will just fall client side, but not server side. Therefore the sand will still stay as an entity even if it looks like it hit the ground. If you reopen the world, it will appear on the ArmorStand again.. Note, that the FallingSand will drop as a Item if it persists for more than 400 game ticks (20 seconds).

Test command:

/summon ArmorStand ~ ~5 ~ {NoGravity:1b,Passengers:[{id: "FallingSand" ,Time:1,Tags:[ "NoDespawn" ]}]}

In order to prevent the FallingSand from dropping after 400 ticks do in a repeating command block:

/entitydata @e[tag=NoDespawn,type=FallingSand] {Time:1}

Since there are some duplicates with Skeleton horse attacks let's describe that as well so that this report gets found a little better:

If you are in a survival world, occasionally during a thunder storm there might spawn a skeleton horse trap. There are Skeletons riding a horse then. If you reproduce the bug as described above, the skeletons will float in the air, can not get hit by you and will still shoot from the bag of the skeleton horse.

Also on a multiplayer server, when riding a horse, boat or minecart, other players on that server might not see you correctly as described.

Code analysis by [Mod] Marcono1234: https://bugs.mojang.com/browse/MC-96954?focusedCommentId=304953&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-304953