The NBT of Inventory is actually updated correctly. For example, if you replace a gold block in your offhand with diamond block and trigger this bug, what is displayed in your inventory is gold block. but if you place it, it turns out to be diamond block. So it seems to be a client-side display bug.
But what is weird is that the item that has triggered this bug can be regained if you place it to another slot or just throw it away and pick it up, which means it is more than just a display bug.
Still affects 1.13, 1.14, 1.15, 1.16.
The NBT of Inventory is actually updated correctly. For example, if you replace a gold block in your offhand with diamond block and trigger this bug, what is displayed in your inventory is gold block. but if you place it, it turns out to be diamond block. So it seems to be a client-side display bug.
But what is weird is that the item that has triggered this bug can be regained if you place it to another slot or just throw it away and pick it up, which means it is more than just a display bug.