With the Mod/Datapack you can give players a tag with which they can keep the items after death.
If you find any bugs or have any Datapack/Mod suggestions, please let me know on my Discord.
You can tag players with
/tag [PlayerName] add KeepInv
and remove it with
/tag [PlayerName] remove KeepInv
In Version 1.0.3 or higher, you can set whether you keep the XP or it is completely reset
Reset XP (by default)
/scoreboard players set xp keepinvtag 1
Keep XP (for everyone)
/scoreboard players set xp keepinvtag 0