Why my topdown 2D character slows down when running diagonally along a wall ?

Okay, I get it. If you want the character to keep moving fast, then remove input left or right when hitting any walls, and vice versa. I am gonna figure out how to do that