Triggers don't seem to work the first time after switching to app

I have a setup using variables and Magic Mouse taps. For some reason, it will never work the first time right after switching to an app, but after that it will consistently.

Magic Mouse

Device information:

  • Type of Mac: MacBook Pro 2019
  • macOS version: 14.0 (23A344)
  • BetterTouchTool version: 4.289