Troubles with Hit Flash in my 2D Godot Game

Godot Version

Godot 4.5.1

Question

For my game to indicate when you hit an enemy, I wanted to use a hit flash. I tried to use shaders to achieve this, but it seemed just not to work. So now I am using tweens but I am not sure if there is another property I am supposed to reference instead of modulate, because modulate doesn’t seem to be working for me.

func _on_area_2d_area_entered(area):
	if area.name == "FrogHurtBox":
		area.get_parent().apply_knockback(global_position)
        HitTimer.start()
		var t = get_tree().create_tween()
		t.tween_property($AnimatedSprite2D,"modulate",Color(1.0, 1.0, 1.0, 1.0),.1)