### 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)

NavigationAgent2D();
	virtual ~NavigationAgent2D();
	RID get_rid() const { return agent; }
	void set_avoidance_enabled(bool p_enabled);
	bool get_avoidance_enabled() const;
	void set_agent_parent(Node *p_agent_parent);
	void set_navigation_layers(uint32_t p_navigation_layers);
	uint32_t get_navigation_layers() const;
	void set_navigation_layer_value(int p_layer_number, bool p_value);
	bool get_navigation_layer_value(int p_layer_number) const;
	void set_pathfinding_algorithm(const NavigationPathQueryParameters2D::PathfindingAlgorithm p_pathfinding_algorithm);
	NavigationPathQueryParameters2D::PathfindingAlgorithm get_pathfinding_algorithm() const {
		return pathfinding_algorithm;
	}
	void set_path_postprocessing(const NavigationPathQueryParameters2D::PathPostProcessing p_path_postprocessing);
	NavigationPathQueryParameters2D::PathPostProcessing get_path_postprocessing() const {
		return path_postprocessing;
	}
	void set_path_metadata_flags(BitField<NavigationPathQueryParameters2D::PathMetadataFlags> p_flags);
	BitField<NavigationPathQueryParameters2D::PathMetadataFlags> get_path_metadata_flags() const {
		return path_metadata_flags;
	}
	void set_navigation_map(RID p_navigation_map);
	RID get_navigation_map() const;
	void set_path_desired_distance(real_t p_dd);
	real_t get_path_desired_distance() const { return path_desired_distance; }
	void set_target_desired_distance(real_t p_dd);
	real_t get_target_desired_distance() const { return target_desired_distance; }
	void set_radius(real_t p_radius);
	real_t get_radius() const { return radius; }