In fact, I can also press any key in-between two clicks on the Run/Try Button to make it work. So what I called caveat isn't actually much of a caveat
It seems the API just needs any key event to update the state internally, so that it can report back the correct state when the macro is run.
Edit:
For testing, here is your version with the ASOC script, plus the setter JXA action (using the return value from the ASOC script):