How to stop widget from losing focus

i have a canvas panel that i set it’s visibility to visible on key press and hidden on key release(basically visible while holding the key). This canvas has buttons that absorb the clic and fire an event.

Everything works just fine until i lose focus(clic on the world instead of the ui) and try to clic the buttons on the ui, when i do this key release seems to be called and it hides the canvas, i want to be able to clic on the world and then on the ui

Things i’ve tried:

  • Render Focus Rule setting seems to
    have no effect
  • The widget is
    focusable and is set focus on key
  • Input mode is Game and UI
  • Set focus on OnFocusLost and OnRemovedFromFocusPath
  • Setting the widget root as visible

What i want:

  • Be able to show the canvas without interrupting the shooting(event on pawn)
  • Be able to move while having the canvas visible(events on pawn)
  • Be able to clic on the world(to shoot) and then clic the button inside the canvas