I also had this and I definitively fixed it. I had to
- call the SetInputModeGameAndUI node (I did it in my PlayerController)
- In the project settings, uncheck “Should Flush Pressed Keys on Viewport Focus Lost”
I also turned “Focusable” off on all the widgets, but I didn’t go back and check if that made a difference.