It's not possible to toggle the "When I say" checkbox, as you would manually to prevent a command from getting executed by speech, programatically.
You have a few options to mitigate this issue, among which are:
Make your command phrases longer so they're less likely to get triggered erroneously, and/or up to minimum confidence level.
Allow the command to trigger, but use a condition to have them do nothing if a variable has a certain value(you can combine this with the "Ignore an Unrecognized Word or Phrase" action to stop it from showing up in the log).
If you really want to stop the commands from executing by speech entirely, you'll have to use a token in the "When I say" field to make it blank at will. This requires using the "Reset the Active Profile" action to refresh the value of the variable, which also means stopping all commands.