### Godot version

4.2-rc1

### System information

Windows 11, Vulkan

### Issue description

When using the NavigationAgent2D the "target reached" signal usually does not trigger if the target desired distance value is below the path desired distance.  If, however, the navigation agent target position is set while the agent is within the desired distance then it will reliably trigger.

This can be simulated by either issuing a nearby move command or by setting (and thus recalculating) the target position every frame.

### Steps to reproduce

1. Implement a basic CharacterBody2D
2. Add a NavigationAgent2D node and leave the default values
3. Set up the CharacterBody2D to move when its NavigationAgent2D has its movement position set (based on the Using NavigationAgents documentation)
4. Connect the on_target_reached and on_navigation_finished signals
5. Move the character around and observe that navigation is finished before the target is reached when the target position is set beyond the target desired distance
6. Move the character a small distance within the target desired distance; observe the target reached signal reliably triggers
7. Set the target desired distance higher than the path desired distance (or vice versa); observe that the target reached signal more reliably triggers.

### Minimal reproduction project

[target-reached-test.zip](https://github.com/godotengine/godot/files/13444552/target-reached-test.zip)

void set_neighbor_distance(real_t p_distance);
	real_t get_neighbor_distance() const { return neighbor_distance; }
	void set_max_neighbors(int p_count);
	int get_max_neighbors() const { return max_neighbors; }
	void set_time_horizon_agents(real_t p_time_horizon);
	real_t get_time_horizon_agents() const { return time_horizon_agents; }
	void set_time_horizon_obstacles(real_t p_time_horizon);
	real_t get_time_horizon_obstacles() const { return time_horizon_obstacles; }
	void set_max_speed(real_t p_max_speed);
	real_t get_max_speed() const { return max_speed; }
	void set_path_max_distance(real_t p_pmd);
	real_t get_path_max_distance();
	void set_target_position(Vector2 p_position);
	Vector2 get_target_position() const;
	Vector2 get_next_path_position();
	Ref<NavigationPathQueryResult2D> get_current_navigation_result() const { return navigation_result; }
	const Vector<Vector2> &get_current_navigation_path() const { return navigation_result->get_path(); }
	int get_current_navigation_path_index() const { return navigation_path_index; }
	real_t distance_to_target() const;
	bool is_target_reached() const;
	bool is_target_reachable();
	bool is_navigation_finished();
	Vector2 get_final_position();
	void set_velocity(const Vector2 p_velocity);
	Vector2 get_velocity() { return velocity; }
	void set_velocity_forced(const Vector2 p_velocity);
	void _avoidance_done(Vector3 p_new_velocity);
	PackedStringArray get_configuration_warnings() const override;
	void set_avoidance_layers(uint32_t p_layers);