It looks like this issue is related to the $window().state property, not /scid or /scon.

mIRC is actually reporting the window state correctly in this case. This is due to the way MDI windows work. When an MDI window is maximized, all other windows in the MDI container are changed to a non-maximized state by Windows. Only when the window becomes active is it set back to a maximized state.

I could make mIRC return a fake state value for a window if 1) the top, active window is maximized, and 2) the window you are checking is in a visible, restored state. That would resolve the issue, however it would not be returning the actual window state.