Keeping gameobject at constant speed regardless of drag,Keeping constant force regardless of drag

So, I’m a newbie who just started Unity. I made a game where you just dodge obstacles with a cube, and everything is going fine until when I added a jump option. To keep it moving at one direction, I used AddForce every FixedUpdate on the z axis, and the player IS moving at a constant speed, but when it jumps, the player accelerates. I think it is because of the lack of drag.

Here is my script for PlayerMovement:

{
public Rigidbody rb;

public float forwardForce = 700f;
public float sidwaysForce = 100f;

public Vector3 jump;
public float jumpForce = 3.0f;

public bool isGrounded;

void Start()
    {
        rb = GetComponent<Rigidbody>();
        jump = new Vector3(0.0f, 2.0f, 0.0f);
    }

void OnCollisionStay()
{
    isGrounded = true;
}
void OnCollisionExit()
{
    isGrounded = false;
}
void Update()
{
    if (Input.GetKeyDown(KeyCode.Space) && isGrounded)
    {

        rb.AddForce(jump * jumpForce, ForceMode.Impulse);
        isGrounded = false;
    }
}
void FixedUpdate()
{
    rb.AddForce(0, 0, forwardForce * Time.deltaTime);

    if (Input.GetKey("d"))
    {
        rb.AddForce(sidwaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
    }

    if (Input.GetKey("a"))
    {
        rb.AddForce(-sidwaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
    }
    
    if (rb.position.y < -1f)
    {
        FindObjectOfType<GameManager>().EndGame();
    }
}

}
,So, I’m a newbie that is trying to make a simple game where you just move a cube and dodge obstacles. the cube moves forwards via adding force on the z axis every FixedUpdate. Now this is working fine, but after I made a jump option, when the gameObject is in the air there are no drag, causing it to accelerate. The acceleration gets balanced out slowly after it hits the ground again, but if you keep spamming jump it will just get faster and faster.

I think the problem is friction. When your object is sliding along the ground, it is colliding with it and friction is acting upon it and when you jump up in the air, friction from the ground is not acting on your object. The best way to fix this is to add a physics material and remove the friction by setting it to 0. Then add the physics material to your rigidbody. This solution might cause your object to speed up because friction will no longer be acting on the object and you set these values while friction was active so you might want to change your speed values to something lower. Hope this helps!

But then instead of adding force every FixedUpdate, I only need to do it once during void Start, right?

Edit: Well, that didn’t go so well. By only adding one burst of speed, somehow with a physics material of 0 friction, and rigidbody of 0 drag on the player, it still slowed down.