Gamepad/Keyboard navigation in UMG menus?

Sorry I was mistaken on the function to override, this is the good one:

UCLASS()
class UMyGameViewportClient : public UGameViewportClient
{
	GENERATED_BODY()

public:

	virtual TOptional<bool> QueryShowFocus(const EFocusCause InFocusCause) const override;
	
}

.cpp code:

TOptional<bool> UMyGameViewportClient::QueryShowFocus(const EFocusCause InFocusCause) const
{
	return false;
}

With this, the dotted line will no longer appear.

Tell me if this works for you.