You are using canJump and isGrounded at the same time which can cause confusion. Use just isGrounded and let the player jump when it is true. Also check the ground mask and if the player is not included in it.