Problems with await making duplicates routines

Godot Version

4.X

Question

I’m making a qte combat system.
The system is working, but I’m figuring out how to patch out a bug caused by await.
While I have some idea how to deal with it, they feel so bad that I’m holding on to see if there’s a better approach…

Basically, the system works like this:
1.Start the qte, flip some bool like “is_accepting_input” so the system knows if it should check the player input.
2.If player inputed and bools like is_accepting_input and is_qte_going are true, check the input timing, and call qte_success() or qte_fail() depending on the result.
3.qte_success() and qte_fail() play their animation, once the animation is done, check the bools again, and start another qte sequence if conditions are matched.
4.If player hit escape, cancel all procedural, flips the bool so nothing can progress further.

The problem is “once the animation is done” part in the qte_success() and qte_fail().
I simply used await qte_animation.finished, and have some if statements behind it.
If player escape, then the is_qte_going got set to false, everything got stop at the following if !is_qte_going: return behind the await signal.
HOWEVER. If players quickly engage the fight again, so quick that the last animation hasn’t been finished, is_qte_going would be set to true again due to the engagement, and the qte_success() from the last engagement would come through and set up another qte sequence, making 2 qte sequence going at the same time.

So, what do I do?
State machine probably won’t save me here, since the the state would have to switch back like the booleans anyway.
It would not be a problem if only a single instance of the function or the script can be running…I haven’t dig much, but it doesn’t look like static functions is a way to go either.
The closest solution I have right now, is to make an ID system.
Assign a new value at engagement, and the rest of the code instead of checking if is_qte_going == true, they do if cached_qte_id == current_qte_id, so they won’t execute command from last session.
…Is this really a good idea? I mean, I can explain the rational just fine right now, but I feel like I’m setting myself up with headaches few months down the line.
The core of the issue is simply the function got stuck with await, and can’t tell the environment had actually changed. Is that really worth the hack?
I mean, as far as I know, await can’t be killed, it either finishes a function or dangling in memory forever, and I can’t think of a better way to hold off function execution.

So what’s your take?
Am I thinking about this too much and should just go for whatever seem functional? Am I missing some simple solution?
Thanks for reading.

Update: Made the ID thing, it’s functional now. Hope to see a better solution so I can refactor it out though.