The bug
When switching to another stack of the same item while consuming (eating / drinking) a consumable item, the eating animation continues, but no item is consumed, no hunger is restored and no effect is applied.
To reproduce
Get two stacks of the same food in your inventory
Select the first one
Start eating from it
Switch to the second one while eating
→ ❌ The animation continues, but the food is not consumed
Also affects potions / water bottles / honey bottles.