Maintain direction that the character was facing. Stop Drifting

You need to multiply the character right and forward vectors with the axis input values.
If you create a new project that’s a first person or third person template, and open up the character pawn blueprint, you will see how that setup works.

(Those samples decode the input in the character directly, whereas you typically want to do this in the player controller for most flexibility, but the multiplying character-vectors with input-values works the same both ways.)