### 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
const float rb = Math::deg_to_rad((float)((i + 1) * 12));
		const Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * search_radius;
		const Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * search_radius;
		
		switch (up_axis) {
			case Vector3::AXIS_X:
				lines.append(start_position + Vector3(0, a.x, a.y));
				lines.append(start_position + Vector3(0, b.x, b.y));
				break;
			case Vector3::AXIS_Y:
				lines.append(start_position + Vector3(a.x, 0, a.y));
				lines.append(start_position + Vector3(b.x, 0, b.y));
				break;
			case Vector3::AXIS_Z:
				lines.append(start_position + Vector3(a.x, a.y, 0));
				lines.append(start_position + Vector3(b.x, b.y, 0));
				break;
		}
	}
	
	for (int i = 0; i < 30; i++) {
		
		const float ra = Math::deg_to_rad((float)(i * 12));
		const float rb = Math::deg_to_rad((float)((i + 1) * 12));
		const Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * search_radius;
		const Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * search_radius;
		
		switch (up_axis) {
			case Vector3::AXIS_X:
				lines.append(end_position + Vector3(0, a.x, a.y));