Curse of Vanishing

Curse of Vanishing is an enchantment that causes the item to disappear on death.

When the player dies, the item disappears instead of dropping on the ground. The item may still be dropped normally.

Counts as a treasure enchantment — can only be obtained from chest loot, fishing, or trading for enchanted books.

The effect can be prevented by setting the  gamerule to.