Sure - just place a single button in a menu, and style it to look like your "Inventory bag" icon.
The idea is to keep your InventoryBox in a separate Menu, and turn that menu on/off using this button.
When you click the Button, set it's Click type to ActionList Asset, and create a new ActionList that starts with the Menu: Change state Action. You can use this Action to check if the Menu with the InventoryBox is open, and close it if so (and vice versa).
You can read more about using ActionList assets in Menu Buttons here.
Can I ask how do you hide the menu it if the inventory item is selected? When you drag the item around the screen while left mouse button still pressed
Wait for v1.40 - you'll be able to run an ActionList when a menu is turned off. Set your inventory box's appear type to "Mouse Over", and make sure the menu extends such that the cursor is over if when the "Inventory bag" button is clicked. Then, instead of turning on the menu - you unlock it, instead. And when the mouse leaves the menu, you lock it again.
Comments
The idea is to keep your InventoryBox in a separate Menu, and turn that menu on/off using this button.
When you click the Button, set it's Click type to ActionList Asset, and create a new ActionList that starts with the Menu: Change state Action. You can use this Action to check if the Menu with the InventoryBox is open, and close it if so (and vice versa).
You can read more about using ActionList assets in Menu Buttons here.