Jdunascii's Keep Inventory is a lightweight server-side Minecraft mod that gives you fine-grained control over the keepInventory mechanic — enabling it per player, rather than globally for the entire world.
keepInventory and experience retention/keepInventory <player> <true|false>
keepInventory is enabled for a player, preventing duplication.keepInventory gamerule — it operates independently per player.