Set Input Mode "Game & UI" with Common UI plugin

This is how you can do it:

The HUD and the C++ need to agree that the appropriate Input Mode is All (Game+Menu). And the mouse capture in my case was CapturePermanently_IncludingInitialMouseDown with an invisible mouse, and CaptureDuringMouseDown with a visible mouse.

More info: