When a user has an item selected in their inventory during dimension change, the item will be dropped before the user teleports. This should not happen, because it leads to item loss.
This can be solved by:
1. saving the selected item in inventory on dimension change,
2. closing the inventory before the teleport (not recommended, because if the item is selected while the inventory is full, it will be dropped).
I noticed this bug even in earlier versions of Minecraft, but do not know exactly which versions are affected by it.
Video:
https://www.youtube.com/watch?v=ClU8dI2OyPI&feature=youtu.be
The best solution, I think, is just moving the player to the new dimension, open their inventory, and hold the item; keeping the item cursor selected, but not making a special "cursor held" slot only used for this instance.
Non-server steps to reproduce:
Make an end portal
Go high above it
Drop to it, and before falling in,
open your inventory and grab an item