Help with turn timer tied to progress bar

My game has a turn timer that can be modified by external factors such as status conditions.
At the moment, when any effect that changes the turn timer is applied (such as slow or haste), the Entity’s turn timer (governed by a component named CooldownComponent) adjusts the remaining turn timer to reflect the changes. For examples, if an entity has a 15 second turn timer, and it receives .5 slowdown 13 seconds in, the current turn timer is set to the remaining 4 seconds (the original 2 seconds left, slowed down by half). The next turn would reflect the slowdown, so it would take 30 seconds as expected.

The example values were simplified for the sake of discussion. The logic works exactly as intended.

The problem I’m having is that I have a progressBar tied to turn timer, and the bar resets when the turn timer resets, which is visually jarring for the player, because depending on the turn timer left at the moment of the effect applied, it makes it seem like the enemy is taking a very quick turn, instead of just finishing the progress in its current turn timer. I’m trying to make it so that the progress bar just slows down, but since it is tied to the timer, which obligatorily resets, I’m not finding any way around this.

This is the code for the Turn Timer Bar:

extends ProgressBar
class_name TurnTimerBar

#var timer: Timer
var max_time: float = 0.0  # Maximum time for the turn
var elapsed_time: float = 0.0  # Time elapsed
var cooldown_component: CooldownComponent
var character_name: String

func set_bar(time_dict: Dictionary):
	max_time = time_dict["max_time"]
	min_value = 0
	max_value = max_time
	value = 0

# Update the bar based on elapsed time
func update_bar(time_dict: Dictionary) -> void:
	var time_left: float = time_dict["time_left"]
	var max_time: float = time_dict["max_time"]
	
	if time_left > 0:
		value = max_time - time_left
	else:
		value = max_time

# Called every frame to update the bar
func _process(delta) -> void:
	var time_dict: Dictionary
	if cooldown_component or character_name:
		if cooldown_component:
			time_dict = {
				"time_left": cooldown_component.timer.time_left,
				"max_time": cooldown_component.timer.wait_time
			}
		elif character_name:
				time_dict = CharacterManager.get_character_turn_time(character_name)
		set_bar(time_dict)
		update_bar(time_dict)

and this is the CooldownComponent code:

extends Node
class_name CooldownComponent

@onready var timer: Timer = $Timer	


var entity_resource: Resource
var turn_speed: float
var character_speed: int

# Called when the node enters the scene tree for the first time.
func _ready():
	entity_resource = get_parent().resource
	update(entity_resource.speed)

func update(new_speed: int) -> void:
	var old_turn_speed = turn_speed
	character_speed = new_speed
	turn_speed = ((-.8 * character_speed) + 20)
	
	# Check if the timer is running to adjust its remaining time
	if not timer.is_stopped():
		# Calculate the current progress percentage
		var time_left = timer.get_time_left()
		var progress_percentage = time_left / timer.wait_time
		
		# Update the timer's wait_time to the new turn_speed
		timer.wait_time = turn_speed
		
		# Adjust the timer's remaining time to maintain progress
		var new_time_left = timer.wait_time * progress_percentage
		timer.stop()
		timer.start(new_time_left)
	else:
		# Update the wait_time directly if the timer is stopped
		timer.wait_time = turn_speed
	
	print("UPDATED SPEED: {0} | TURN SPEED: {1}".format([character_speed, turn_speed]))

func start_timer():
	print("TIMER STARTED FOR {0} | TIME: {1} | SPEED: {2}".format([entity_resource.name, timer.wait_time, character_speed]))
	timer.start()
	
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	#if !timer.is_stopped():
	#	print(timer.get_time_left())
	pass

func _on_timer_timeout():
	pass

Instead of directly updating the value, try to lerp instead. This should make it less yarring, and you can then also control how fast the bar can change, using some lerp speed variable