How can I make a T Fip Flop with commands in 1.13+?

It seems like the technique used to test for a success count in previous versions does not work in 1.13+, due to unknown reasons.

I have found a solution which unfortunately involves an arbitrary storage location (scoreboard) but works:

execute store success score @p test run execute if score @p test matches 0

You will have to set up a scoreboard objective named test and have this command store its success in the score.


P.S. For all you command gurus out there who want me to remove run execute from my command, I would prefer to keep run execute in on this command because my practice is to keep it in only for the last subcommand.