Short description of the issue
When you die using an item with the use_remainder component the result ItemStack its removed when player die before the component can finish convert the item, its more noticed with the “Potion of Harming” what use that component to convert to a simple glass bottle when use.
Steps to reproduce the issue in vanilla
Vanilla
Use poison or reduce your health
Consume a Potion of Harming for die
Respawn and check items dropped
Custom
Use
/give @p potion[use_remainder={id:"minecraft:gunpowder"},potion_contents={potion:strong_harming},potion_duration_scale=3]Die using many of them
Respawn and check for the gunpowder dropped
Expected result
The result item (glass bottle/gunpowder) its added and dropped in death
Actual result
The result item (glass bottle/gunpowder) its added but removed in respawn and not dropped
Steps to reproduce:
Give yourself 9 Potions of harming 2
/gamemode survival
Drink every potion until you die
Go back to place where you killed yourself
Notice the total number of bottles (potions of harming 2 and empty bottles) has been decreased to 8