In my case(custom 4.25),touch event dont has this issue,so mobile platform will not be effected,and can check “use mouse as touch” in project settings and it works good(its ok to still use on mouse button up in widgets)
If you dont want to do that for some reason,set the input mode to ui only also fix this (get player controller->SetInputModeUIOnly).as a great habbit you may overwriting OnMouseEnter and OnMouseLeave to set its use ui only mode and not.