Mouse clicks are causing the "unhovered" event to fire

I’m trying to create a button that you have to hold right-click to fire an event, but whenever I right-click, it fires the “unhover” event even though the cursor is still hovered over the button.

How can I fix this?