You could use Cancel All Macros at the end of your macro.
Or for most cases, you could set a very short timeout on the Semaphore Lock, and include a Pause in the macro before (implicitly or explicitly) unlocking it at the end - you’ll still get a repeat of any very recently triggered macros.