Item always is under UI (inventory)

The inventory is on the UI layer, the HP potion is on the main layer.
When I want to drag my item (HP potion) into the inventory I can’t make it over the UI layer because then the HP potion is under the inventory even though the inventory has a lower “Z order” number than the HP potion number.
I also tried to add an HP potion to the UI layer and then this item was above the inventory, unfortunately the item then follows the player…

There is an action to change the objects layer.
You can change the layer of the potion to inventory/ui when dragged