Why do you have this set to process every email ?
You should strive to be as specific as possible when automating things like this.
PS: Apple Mail handles the rules and if they trigger. We don’t. If the rule doesn’t trigger, for whatever reason, the actions don’t happen. That includes running an AppleScript.