### Godot version

4.2-beta1

### System information

MacOS 12.3

### Issue description

<img width="1025" alt="image" src="https://github.com/godotengine/godot/assets/5732688/75d09bb8-a281-43ee-bde8-db66e77c3321">

Using a simple `NavigationLink3D` setup I've noticed the following behaviour:

* Setting enabled at runtime has no effect - in-game or with toolscripts
  * Seems to only take effect on ready or init
* Enabling a navigation layer *does* have an effect on calculated paths, allowing the agent to continue
* Disabling a navigation layer has no effect on calculated paths

Video [here](https://www.youtube.com/watch?v=AdLkgnt1L6E). This shows the simple case.

It seems that the only way to recalculate a newly blocked path is to emit some signal and ask those agents to recalculate. That will likely work and I'll be doing that next, however for the following reasons I think this is a bug or incorrect behaviour:

* There's no point in having an enabled flag if it's ignored at run-time
* Enabling a navigation layer has the correct effect, but disabling it does not, which is inconsistent


### Steps to reproduce

1. Load the repro project
2. Select the `Agent` node and enable `walk`
3. Select the `Barrier` node and toggle `enable`
  1. This toggles the `Barrier/NavigationLink3D:enabled` field, and the `Barrier/StaticBody:collision_layer`
5. Notice the path is not blocked

To underscore the problem, disable the `Barrier/StaticBody3D:collison_layer` while the barrier is enabled and see that the agent walks straight through the barrier even though the link is disabled.

Additionally, notice that:
* If you set `NavigationLink3D:enabled` to false and run the game, toggling with the provided button will not work. The link cannot be turned back on.
* Toggling enabled/disabled in-editor also has no effect, because the tool script has already initialised the link

### Minimal reproduction project

https://github.com/wjagodfrey/godot_4_2_beta1_navigation_link_toggle
if (!is_inside_tree()) {
		return Rect2();
	}
	real_t radius = NavigationServer2D::get_singleton()->map_get_link_connection_radius(get_world_2d()->get_navigation_map());
	Rect2 rect(get_start_position(), Size2());
	rect.expand_to(get_end_position());
	rect.grow_by(radius);
	return rect;
}
bool NavigationLink2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
	Point2 segment[2] = { get_start_position(), get_end_position() };
	Vector2 closest_point = Geometry2D::get_closest_point_to_segment(p_point, segment);
	return p_point.distance_to(closest_point) < p_tolerance;
}
#endif 
void NavigationLink2D::set_enabled(bool p_enabled) {
	if (enabled == p_enabled) {
		return;
	}
	enabled = p_enabled;
	NavigationServer3D::get_singleton()->link_set_enabled(link, enabled);
#ifdef DEBUG_ENABLED
	if (Engine::get_singleton()->is_editor_hint() || NavigationServer2D::get_singleton()->get_debug_enabled()) {
		queue_redraw();
	}
#endif 
}
void NavigationLink2D::set_bidirectional(bool p_bidirectional) {