When inside of a boat, and opening up your inventory. If you attempt to shift click an item to/from your hotbar to your inventory, will cause you to also dismount from the boat.
Linked issues
Comments 4
Explanation: Sometimes when shift clicking and then closing the inventory, you might still hold shift briefly after the inventory is closed, causing you to get dismounted. This is what the reporter is probably experiencing. And I can reproduce this in 1.16.4. To fix:
Make it so that if you start holding shift in a GUI, you shouldn’t perform the shift action upon closing, if you still hold it down. You would instead need to let go of the button and press it again to sneak/dismount. However if you start holding down shift when not being in a UI and open a UI and close it again, you should sneak again when closing it.(see MC-86513)
Cannot confirm unless closing the inventory while still holding shift.