keep item in slot

Trying to detect with advancements if a certain slot is emptied then run a function. Tried inventory_changed, but couldnt figure out detecting if the slot is empty.

Continue to help post