Full Inventory and Matrix Cube Key
Unfortunately all MMO’s and other inventory having games do inventory replace like that. Some of them have an additional overload window that pops up telling you your inventory is full and has the additional item in the window so you can take it after you delete something else.
Logic is like this: user clicks consumable, open it (rng if necessary), place it in inventory, delete empty container. The delete happens at the end just in case there’s an issue with something and the rest of the process didn’t complete so you still have the item and can try again.
It is a problem of course, but they probably aren’t going to do anything about it unfortunately.