UI buttons become inactive after clicking world

Here is a screenshot of the widget class, the mouse cursor is hovering over the button (just noticed the screenshot is still not capturing the cursor, the button is the grey box with blue outline):

The strange thing is, the button works perfectly fine if i click on the button before clicking on the world… but once i click on the world, the button becomes inactive (just doesnt detect clicks)

And i have already tried the focus widget thing, no change.