To follow up, I’m several hours into this problem and I haven’t been able to find any way to do this the “right” way, if there is such a thing.
Instead, I’m just leaving the mouse invisible and I created a custom HUD class that draws a rectangle where the mouse is supposed to be. It’s crude, but at least the input consistently works now.
I guess at some point I’ll try to make it look like a mouse.