Your cap does exactly what you ask it for
The problem is that the two subevents are run one after the other right away. This is what happens in one frame when you click:
The global equals zero, so the action is performed setting the global to one.
The global now equals one, so the action is performed, too, resulting in the global being set to zero again.
If you just need a simple state (0 and 1), instead of the event with two subevents just use the following one.
+On left clicked on Sprite
->Set global to 1-global