Do you mean the small "frame-action-button" (together with close button) on the window title bar?
I try to make the style consistent with the vanilla counterparts, and it seems no vanilla GUI uses toggle styles in "frame-action-button".
The other problem being the current game API actually does NOT expose toggle state of GUI button. (Yes, current API really lacks a lot of almost essential things. The GUI part is rather basic...) Vanilla "toggle exoskeleton" & "toggle roboport" uses toggle state in GUI button; but mods cannot use that in our own GUIs. I actually have to use extra script to change the style of the train status buttons on-fly, and need to use global variables to store the state of every of these buttons! (A mature programming language, like C#, would have already handled that. That's why I said Factorio GUI API is rather basic.)
It is certainly quite bothersome. So I prefer not to use that too much, unless it is really necessary.
PS: There are many other IMO essential fundamental features missing in the Factorio GUI API. Say GUI tables does NOT have the concept of rows and columns (only got cells...), no header row/column, no row/column spanning, no row sorting... I wanted to have table sorting in the railway GUI, so to sort trains by name, cargo contents, or whatever. However, this is not supported by the GUI API. (Or else I have to write my own scripts to construct sorted table on-fly, at the cost of extra processing time.) So then I decided not to get myself into this kind of trouble. It is so difficult to implement a lot of things without support from the fundamental features.