Make the player be unable to change direction when idling (or dead)?

So, I set up an event so when the player is dead it sets the max jump and horizontal speed of player to 0, bc when I disable the platformer character behavior it wont fall down and I want the player character to fall down, but when setting up the event like mentioned at the beggining the player still can change direction when pressing the movement keys, how do I make it to not be able to change direction?

Related screenshots

Sorry for my bad english

Solved (I shouldnt post these issues on reddit and the gdevelop forum at the same time)