UE5 widget not getting focus on click

when I click on a button or a grid slot the mouse is focused on these items, but when I click between the slots or any part of the widget that is not a button or grid the character walks
the bottom of the grid is dark gray, it’s part of the widget, but when I click there, the character walks

is there any way to get focus on the entire widget without using set input mode?

I wanted to leave the input free for the player to control the character with the inventory widget open at the same time

The easiest way I managed to fix this problem was by changing the InputMode on the fly depending on whether I wanted the UI accessible or not:

.h :
FInputModeGameAndUI GameInputModeGameAndUI;
FInputModeGameOnly GameInputModeGameOnly;

.cpp :
GameInputModeGameOnly.SetConsumeCaptureMouseDown(true);
GameInputModeGameAndUI.SetHideCursorDuringCapture(true);

BeginPlay()
PlayerController->SetInputMode(GameInputModeGameAndUI);

OtherFunctions:
PlayerController->SetInputMode(GameInputModeGameOnly);

Hope that helps, good luck.