it's not a slot per say that you are highlighting, it's just an action area.
I would either create a table with all the names of the slots & use a for loop to reset all of them back to inactive image, or check which has active image & reset back to inactive or set a value when clicking item in a slot so you know which one to set inactive after. Does the dragged item not disappear after left clicking or right clicking anywhere on the scene?
The best solution would be to include in left & right click actions (mouse properties) a query to see if an item is currently being held & if so set the inactive image of the inventory slot.
P.S: it's Lua not LUA.
P.P.S It seems that there is no ButtonActive table in the data structure. You may need to create a called by other action which you create a "set button inactive" action part for each of the buttons being used as inventory place holders.
In mouse settings I mentioned earlier, add an execute a script action containing something along the lines of...
if game:getLink(VGameUsedItem) ~= nil then
..the code & methods I have mentioned are theoretical!