There's no such animation in your animated sprite. :)
Look at the line where you change animation:
animated_sprite.play(state_name + dir_name)
You concatenate the name from state and direction and you get dir_name like this:
var dir_name = _find_dir_name(facing_direction)
...
func _find_dir_name(dir : Vector2) -> String:
var direction = ""
for dir_name in dir_dict:
if dir_dict[dir_name] == dir:
direction = dir_name
return direction
...
var dir_dict = {
"Left" : Vector2.LEFT,
"Right" : Vector2.RIGHT,
"Up" : Vector2.UP,
"Down" : Vector2.DOWN
}
As you can see there's no mapping for diagonal movement.
You can also reverse your dir_dict to:
var dir_dict = {
Vector2.LEFT: "Left", ...
}
and then refactor your _find_dir_name method to:
func _find_dir_name(dir : Vector2) -> String:
return dir_dict.get(dir, "Something went very wrong")