I’m not sure what I can do to fix it.
jumpKeyPressed can only get set to false if the player is grounded.
Instead, write your FixedUpdate function like this:
private void FixedUpdate()
{
if (grounded && jumpKeyPressed)
rb.AddForce(Vector3.up * 5, ForceMode.Impulse);
jumpKeyPressed = false;
}