### Godot version

4.1 beta 3

### System information

Windows 11

### Issue description

When you free a navigation obstacle 3D (probably the same for 2D?), The navigation agents still treat them like they are there. I was able to find a workaround, which is to do `navigation_enabled = false` before you run `queue_free()`. However, this does NOT work when you use something like
```
func _notification(what): 
    if what == NOTIFICATION_PREDELETE:
        avoidance_enabled = false
#This doesn't work ^^^
```

I would expect getting rid of a navigation obstacle to automatically stop it being considered by any navigation agents.

### Steps to reproduce

Set up some sort of navigation system with navigation avoidance turned on. Spawn in some obstacles and free them without turning off their avoidance_enabled(). As the navigation agent continues, it will still avoid nonexistent obstacles.

To use the MRP, play around with the exported variables "stop on predelete" and "stop before queue free" on the node3D in the main scene. Then run the project and wait for the obstacles to stop spawning in. If stop before queue free is off, then you should see the agent still trying to avoid obstacles even though they aren't there. If it is on, it should work as expected. The "stop on predelete" variable doesn't have any effect, despite turning off avoidance_enabled before the obstacle is freed. 

### Minimal reproduction project

[Navigation Avoidance MRP.zip](https://github.com/godotengine/godot/files/11852775/Navigation.Avoidance.MRP.zip)

p.points.resize(mesh_poly.size());
		p.edges.resize(mesh_poly.size());
		Vector3 center;
		real_t sum(0);
		for (int j(0); j < mesh_poly.size(); j++) {
			int idx = indices[j];
			if (idx < 0 || idx >= len) {
				valid = false;
				break;
			}
			Vector3 point_position = transform.xform(vertices_r[idx]);
			p.points[j].pos = point_position;
			p.points[j].key = map->get_point_key(point_position);
			center += point_position; 
			if (j >= 2) {
				Vector3 epa = transform.xform(vertices_r[indices[j - 2]]);
				Vector3 epb = transform.xform(vertices_r[indices[j - 1]]);
				sum += map->get_up().dot((epb - epa).cross(point_position - epa));
			}
		}
		if (!valid) {
			ERR_BREAK_MSG(!valid, "The navigation mesh set in this region is not valid!");
		}
		p.clockwise = sum > 0;
		if (mesh_poly.size() != 0) {
			p.center = center / real_t(mesh_poly.size());
		}
	}
}