Dynamic Jump Height not working

Godot Version 4.7

Question

So I’m pretty new to when it comes to physics in games programming but I’m having issue with my Jump Component, not seemingly receiving when a Jump is being held, when pressing jump I jump the right height as expected, but when I hold jump down I should jump a little higher and yet I always jump the exact same amount.

Here is some of my InputComponent Code, I have tested the JumpPressed and JumpHeld variables with debug logs and it works as expected in this script.

public partial class InputComponent : Node
{
	public bool isJumpPressed;
	public bool isJumpHeld;
	// More Inputs being gathered here...

	public override void _Ready()
	{
		isJumpPressed = false;
		isJumpHeld = false;
		// More Inputs being Initiialized here...
	}

	public void Update(float delta)
	{
		isJumpPressed = Input.IsActionJustPressed("Jump");
		isJumpHeld = Input.IsActionPressed("Jump");
		// More Inputs being updated here...
	}
}

Here is the JumpComponent Code:

public partial class JumpComponent : Node
{
	[Export]
	public CharacterBody2D characterBody;
	[Export]
	public float jumpVelocity = 500f;
	[Export]
	public float jumpHoldVelocity = 300f;

	private Node Parent;
	private Timer jumpHoldTimer;
	public bool jump = false;
	public bool isJumpHeld = false;

	public override void _Ready()
	{
		// Assigning Parent, Timer and some error checking for both.
	}

	public void Update(float delta)
	{
		if (characterBody is null) return;
		if (jump && characterBody.IsOnFloor())
		{
            // Small tap jump works fine
			characterBody.Velocity = new Vector2(characterBody.Velocity.X, -jumpVelocity);
			jumpHoldTimer.Start();
			Log.Info(Parent.Name, "Jump initiated.");
		}
		if (jumpHoldTimer.TimeLeft > 0.0f)
		{
			Log.Info(Parent.Name, "JumpHoldTimer: " + jumpHoldTimer.TimeLeft.ToString());
		}
        // The inside of this if statement never seems to run as the console never displays the debug log
		if (!characterBody.IsOnFloor() && isJumpHeld && !jumpHoldTimer.IsStopped() && jumpHoldTimer.TimeLeft > 0.0f)
		{
			float currentJumpHoldVelocity = jumpHoldVelocity * ((float)jumpHoldTimer.WaitTime - (float)jumpHoldTimer.TimeLeft) / (float)jumpHoldTimer.WaitTime;
			characterBody.Velocity = new Vector2(characterBody.Velocity.X, -(jumpVelocity + currentJumpHoldVelocity));
			Log.Info(Parent.Name, "Jump hold active.");
		}
		if (characterBody.IsOnFloor())
			jumpHoldTimer.Stop();
		jump = false;
		characterBody.MoveAndSlide();
	}
}

There is some small code joining the two components together, it works for the seperate move component and the regular jump so I doubt it is that, the issue is the definitely in the if statement never running as the console only every displays the following whem jump is first pressed:

[INFO] [Player] Jump initiated.
[INFO] [Player] JumpHoldTimer: 2

The only value it gives me is 2 for the jump hold timer (the initial value I set in the inspector) which is weird that it never displays anything lower, as if after it is initially started the Update method is broken out of before it reaches that point for some reason. If anyone can identify any probable cause of the problem it would be greatly appreciated.

Don’t stop the timer between starting it and the first MoveAndSlide() call.