Input action not working after unpause game

Solution found, add this

    Controller->FlushPressedKeys();

after this

Controller->SetInputMode(FInputModeUIOnly());