Difficulty implementing knockback in a 2D platformer

I’m currently trying to write a script that knocks the player back when they collide with an enemy, similar to the NES Castlevania games. I’m using the Rigidbody.AddForce method and the only time it works as intended is when the player character is standing still. If the player is in motion, the force isn’t strong enough to knock the player backwards but I don’t want to set knockbackForce too high, otherwise the player will be sent flying back when stationary. Could anyone offer an idea into an alternative way to implement this so that there is a consistent distance the player moves when knocked back? Should I set the player’s velocity to zero before applying the force? Below is the method where I use AddForce.

public virtual void TakeDamage()
{
animator.SetTrigger(“Hurt”);

    if (facingRight)
        rb.AddForce((Vector2.left + Vector2.up) * knockbackForce, ForceMode2D.Impulse);
    else
        rb.AddForce((Vector2.right + Vector2.up) * knockbackForce, ForceMode2D.Impulse);
}

what about this:

rb.AddForce((Vector2.left + Vector2.up) * knockbackForce + rb.velocity.x, ForceMode2D.Impulse);