Make a plugin button that is just one trigger

What I mean by this is that when you click a toolbar Button:
image
image

It stays like that, and for most plugins that is true, but for animator editor for example, when I close the widget with the x button:

The button goes back to being at the normal state, instead plugins like roundify will remain with the button selected if you close the widget
image

To achieve this effect I disabled and enabled the button, causing it to lose it’s active state
image