SnapTap Implementation

Hello, I’m trying to implement some functionality that should work like SnapTap. I’m using this code as a base:

void APlayerCharacter::Move(const FInputActionValue& Value)
{
	FVector2D InputVector = Value.Get<FVector2D>();

	if (IsValid(Controller))
	{
		//Get Forward Direction
		const FRotator Rotation = Controller->GetControlRotation();
		const FRotator YawRotation(0, Rotation.Yaw, 0);

		const FVector ForwardVector = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
		const FVector SideVector = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);

		// Add Movement Input
		AddMovementInput(ForwardVector, InputVector.Y);
		AddMovementInput(SideVector, InputVector.X);
	}
}

What I noticed is that when i’m moving right and press to the left, the character moves left without having to let go of the right key. Same also happens when going forward and pressing the back key.
What I want to do is that this also happens when the opposite occurs, that means, I want the newer input to override the previous one without having to let go of the first input if they are in opposite directions.
Does anyone can give me some ideas on how should i go about it?
Thanks in advance.