I edited event 31 in my screen shot - you left event 32 the same and created a new event. (Now both events are running)
Delete your Event 38 + 39
Edit your Event 31:
Change Is playing attack to: Attack finished
Remove Trigger Once
Plug in my equation to Event 31.
Scroll back to my Previous Screenshot to see how you need your event 31 to look.
I make while touching defBut, defense is true & when touch end, defense is false. I had use that defBut button.