Problem toggling show/hide widget

So in my characterBP on tab press i flip flop A: create a widget menu and on B: i remove it. Works good.

But the problem is that i can not click items in menu, buttons. I have to click the menu, and only then click the buttons. If on creating widget i set “set input mode ui only” then i can click menu buttons immediately when i open menu.

But then my tab key does not close the menu and there is no way to close the menu.
And in menu i can not listen to tab press to close the menu.

How do i make a normal working menu that opens/closes on tab key press and that its items/buttons can be clicked immediately without additional click?

Attaching my menu show/hide code from characterBP