### Godot version

v4.2.rc.custom_build [702227129]

### System information

Godot v4.2.rc (702227129) - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (nvidia) - AMD Ryzen 5 1600 Six-Core Processor (12 Threads)

### Issue description

Found a consistent crash when calling `hide()` from `_notification()`.
It does not happen if the call is deferred.

### Steps to reproduce

The `hide_test.gd` script has a boolean `cause_crash`. If it is true, hovering the mouse over the label crashes without an error in the Godot Editor Console. If it's false it hides the label as expected.

### Minimal reproduction project

[hide_crash.zip](https://github.com/godotengine/godot/files/13452818/hide_crash.zip)

PhysicsDirectSpaceState2D::ShapeResult res[64];
			for (const CanvasLayer *E : canvas_layers) {
				Transform2D canvas_layer_transform;
				ObjectID canvas_layer_id;
				if (E) {
					
					canvas_layer_transform = E->get_final_transform();
					canvas_layer_id = E->get_instance_id();
				} else {
					
					canvas_layer_transform = get_canvas_transform();
					canvas_layer_id = ObjectID();
				}
				Vector2 point = canvas_layer_transform.affine_inverse().xform(pos);
				PhysicsDirectSpaceState2D::PointParameters point_params;
				point_params.position = point;
				point_params.canvas_instance_id = canvas_layer_id;
				point_params.collide_with_areas = true;
				point_params.pick_point = true;
				int rc = ss2d->intersect_point(point_params, res, 64);
				if (physics_object_picking_sort) {
					struct ComparatorCollisionObjects {
						bool operator()(const PhysicsDirectSpaceState2D::ShapeResult &p_a, const PhysicsDirectSpaceState2D::ShapeResult &p_b) const {
							CollisionObject2D *a = Object::cast_to<CollisionObject2D>(p_a.collider);
							CollisionObject2D *b = Object::cast_to<CollisionObject2D>(p_b.collider);
							if (!a || !b) {
								return false;
							}
							int za = a->get_effective_z_index();
							int zb = b->get_effective_z_index();