Thanks.
"I've just tested it and it still works on my side."
That's weird. I've tested this on a new project without any plugins at all, at it still won't work for me. Item icon still stay at hotbar, even when reached 0 and it's not in the inventory anymore. I've you could take a look, I recorded this: https://drive.google.com/file/d/1yphHeZeBMNf-PHM8Q6XYSm2-1sDgwKhP/view?usp=drive...
Edit: Okay, I know where the problem is. If the item has "consumable: yes" then it works, but if that option is "no" and player will lose the item in different way (like my example above), then it's not working (even if the item is 0). Is there an option to fix this? You can ask: why not just set the item to consumable: yes? I can't. This item will be a "wall builder", where wall needs to be placed first, then "wall item" is substracted. Thank you for your time.