Right mouse button disables ui?

I’ve seen several questions about this but none of them have an answer. When the right mouse button is pressed, all of the widgets are unhovered and don’t respond to mouse input. Why does this happen and how do I make it stop? I need the ui to keep working normally while the right mouse button is down.