How to stop mouse click on the viewport to stealing focus from focused button?

I have a simple menu, and the only thing focusable are the buttons, but whenever I click anywhere else on the viewport which aren’t buttons, whatever button is currently focused loses keyboard focus and I have to click a button with the mouse to regain focus.

How to prevent this from happening?

set other Ui to not hit testable self so it wont get hit when you click it