Affects Version/s: 21w03a
Fix Version/s: None
Replacing items in the player inventory succesfully update the Inventory tag (as can be seen with /data get entity @s Inventory) but most times doesn't do so with the GUI.
If the new item is a block, it can be placed but the icon, name, lore, etc. displayed in the GUI are still those of the prevoius item.
If the item replacing the previous one is a consumable, like a splash potions, ender pearls, etc. it can't be used.
As about how to reproduce the bug, I'm not very sure as its behaviour seems to be very erratic.
For sure it happens if the item is replace when the player is using the GUI of some block, like a crafting table.
I'm pretty sure one time it also happened with no GUI open when I was hust trying to replace an item in the hotbar but I wasn't able to reproduce this.
The command that I was trying to run in the first place when I discovered the bug was the following:
Called from a function that's run every time the player use a custom recipe.
Also, I think this is likely closely related to these other bugs previously fixed: