I'm sure this is just an oversight - loyalty-enchanted tridents will drop themselves as an item if they're attempting to return to a player who is dead, and setting doEntityDrops to false doesn't prevent this from happening.
Steps to recreate
-Run command /gamerule doEntityDrops false
-Give yourself a trident with a Loyalty enchantment
-Throw it, then kill yourself before it can return to you
-The trident will be found sitting on the ground as an item.
Related issues
Attachments
Comments


Can confirm in 20w46a
Probably intentional since doEntityDrops
should not prevent the player inventory from dropping on death.
Can confirm in 20w51a.
Can confirm in 21w03a.