This is a repost of MC-133218 for Bedrock Edition.
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.
Reproduction steps
Give yourself any consumable item.
/gamemode s
/tp ~ ~30 ~
or somehow be in the process of dying.Consume your item just before you die.
Note that if doimmediaterespawn
is true, any corresponding effect will be given as if the player had consumed the potion/food properly.
I can confirm