When button pressed, mouse focuses

Why is it when you press a button, it focuses the mouse and then I won’t be able to click for example (tab) to close my inventory. Why does it do that?

I’m basically working with the same blueprint and that’s what I’m trying to achieve (a inventory)