Usable items continue to be used on the death screen after dying when the "keepInventory" gamerule is set to "true"
Open
22
The bug
If you die before you can consume your potion, it still uses the potion and gives you any effects, but upon respawning it gets removed. This only works if you have /gamerule keepInventory true, since otherwise it would just drop the potion. This also affects food.
This affects all usable items and isn't just exclusive to drinking potions and eating food. I've updated this ticket accordingly to reflect this new information.
Can confirm in 1.13-pre7. But drinking after dying will give the effect. It disappears when respawn.