Bug:
When shift-clicking more than one item into your inventory after crafting it, whilst clearing items of that type, the item stays in the inventory until it is either closed and re-opened or picked up by the cursor. Placing the fake item results in a normal decrement of the ghost item stack, although the block is never placed. Crafting and eating eg. a golden apple results in infinite eating.
Steps to reproduce:
Place repeating command block (Always on)
clear @a minecraft:crafting_table
Craft more than one of the specified item.
Shift-move the result into your inventory.
I was unable to reproduce in 1.17