Can someone explain Enhanced Input prority to me?

I’m trying to create a custom inventory system with drag and drop that works with both left and right mouse buttons and I’m really struggling. When I drop things into the inventory slot, I then can’t use the TAB key to get out of it.

I figured what I’d do is, when the widget is opened, use a different mapping context for HUD functions (otherwise the player can still fire their gun and move etc.) AND a mapping context that is strictly set to toggle the widget but with a higher priority, thinking this would get the input first, y’know, as a priority and close the tab.

With the LMB, this seems to work but with the RMB, it doesn’t. The widget has to be focusable, otherwise I can’t drop onto it at all so that’s not an option.

Is there anyone who can explain by the IMC with the higher priority isn’t getting that priority and what, if anything I can do to fix this behaviour?