jump isnt working

I added a function to reset the characters position if it falls off the platform, and my game is made so that the jump height depends on how long you hold the jump button like mario, however when the game restarts the character might be able to jump and might not. I don’t know what is wrong with my code because the chance that it could jump is very random. help would be appreciated.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour {
private Rigidbody2D rb;
public float speed;
public float jumpForce;
private float moveInput;

private bool isGrounded;
public Transform feetPos;
public float checkRadius;
public LayerMask whatIsGround;

private float jumpTimeCounter;
public float jumpTime;
private bool isJumping;

public Vector3 startPosition;

void Awake(){
	startPosition = transform.position; 
}

void Start(){
	rb = GetComponent<Rigidbody2D>();
}

void FixedUpdate(){
	moveInput = Input.GetAxis("Horizontal");
	rb.velocity = new Vector2(moveInput * speed, rb.velocity.y);
}

void Update(){

	if (transform.position.y <= -5){ //restart function
		Debug.Log("Reset Position");
		transform.position = startPosition;	
		return;
	}

	isGrounded = Physics2D.OverlapCircle(feetPos.position, checkRadius, whatIsGround);

	if (isGrounded == true && Input.GetKeyDown(KeyCode.UpArrow)){
		isJumping = true;
		jumpTimeCounter = jumpTime;
		rb.velocity = Vector2.up * jumpForce;
		return;
	}

	if (Input.GetKey(KeyCode.UpArrow) && isJumping == true){

		if(jumpTimeCounter> 0){
			rb.velocity = Vector2.up * jumpForce;
			jumpTimeCounter -= Time.deltaTime;
		} else{
			isJumping = false;
		}
		
	}

	if (Input.GetKeyUp(KeyCode.UpArrow)){
		isJumping = false;
	}

}

}

You are changing the velocity every time in FixedUpdate, making the velocity change in the Update used to jump became lost,.

You need sum the actual value with the new value, or use Rigidbody2D.AddForce and stop changing the velocity manually.