Umg buttons staying pressed?

Anyone know how to solve umg buttons staying in the pressed state after changing the visibility to hidden/visible when changing menus in the OnPressed UButtom function? Please can someone help, it would be much appreciated, thank you!

Update: Found out it works when I override OnClicked instead of OnPressed but I would still prefer it I could do it on OnPressed