Focus shifted to viewport when clicking outside widget

Hi guys I have issue where I have my keyboard/gamepad focus properly set into widget.
However when I click anywhere outside the widget then my focus shifted to viewport.
How to prevent this? Searching whole day can’t find working solution. Changing the canvas to visible and whatnot is not working.
Thank you.

I found this video: https://www.youtube.com/watch?v=6JH7Wyz8f-0
Hope it helps!

Hey thanks!
This can be used to solve the issue however it is not as “clean” as I expected. Is there any other option to do this?

Not that I’m aware of :confused: