How to make a reflect/Counterattack state that goes away only when the target has been hit?

Im trying to make 2 states, one of them reflects magic attacks, while the other reflects physical attacks. but i want the states to only expire whenever the target with the state reflects an attack. Is there anyway i could do this?
have the standard attack add a state on hit that cancels both the reflection and itself.
Another solution is if you're using Yanfly's Counter Control, you can make the skill they use as the counter have a notetag to remove the state from the user.

That would save you from having to copy that Add State onto every offensive skill used by enemies.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-reflect-counterattack-state-that-goes-away-only-when-the-target-has-been-hit.154768/