Animations playing while paused

Godot Version

Godot v4.6.1 Stable

Question

I’ve made a pause menu in my game that works just fine, but Ive noticed that the player’s animations still continue while the game is paused. I have already ensured that the process of both the player node and the AnimatedSprite2D is set to pausable and that the game actually pauses with the code given below of the pause menu autoload:

func _process(_delta: float) -> void:
	if get_tree().paused:
		show()
	else:
		hide()

	if Input.is_action_just_pressed("pause") and get_tree().paused:
		await get_tree().create_timer(0.1).timeout
		get_tree().paused = false
	elif Input.is_action_just_pressed("pause"):
		await get_tree().create_timer(0.1).timeout
		get_tree().paused = true

Is there anything I’m missing?

Try using a Sprite2D with AnimationPlayer.
It might be that AnimatedSprite2D is too automatic and doesn’t use _process(). An AnimationPlayer however should pause.
To not waste time, make a quick test with a new scene, add it and see if it pauses.

I did a quick test and the AnimatedSprite2D pauses when the SceneTree is paused so something in your setup is not set correctly.