Open/Close Widget with FlipFlop node while set to Input Mode UI Only?

I’m using a flip flop node to open and close a widget through a controller blueprint. It is possible for the widget to be closed when ever I have it set to Set Input Mode Game and UI. But if I were to replace Set Input Mode Game and UI with Set Input mode UI Only, then it would not let me close the widget and just only let me open when pressing a key. But after that, unable to close, leaving the widget open.

The reason on why I want to set the widget to Set Input mode UI only is so then the player wont move in the background when ever an arrow key is pressed.

I know there’s an alternate way with Set Game Paused. But I prefer to avoid this route due to me wanting the background to move in real-time while widget is displayed. I would appreciate any help, Thanks.