Mouse position does not update when hovering over UI button

It’s in the title. It’s happening while holding down left mouse button. How to overcome this?