Here is a simplified version of what I wanted to do. My original file is too complex (it has many complex systems for my game so I made this new file).
Hold pressing X in air will make the player go to attack animation. During this animation, pressing left or right won't have an effect.
In my original file, pressing left or right during attack in air gets it stuck in air forever.
In events, I use "Control" because I need it for my other systems. State and Gravity are also variables I used in my original file. They have other uses aside from how I used them in the file attached. Too many to explain and not related to the problem.
Long story short, it works perfectly here in my new file, still problems in old one. It's 1am here, I will look tomorrow again.