### Godot version

v4.0.beta17.mono.official [c40020513]

### System information

Windows11,Godot Mobile backend

### Issue description


https://user-images.githubusercontent.com/15378256/216791307-138e2206-f841-42b4-a9b2-b374da97affc.mp4

When selecting different CollisionShape2Ds, only the first selected gizmo is active and can be used even when selecting different   CollisionShape2D

### Steps to reproduce

Same root, 2 or more CollisionShape2Ds.

Minimal reproduction project uploaded, simply run editor and select between the CollisionShape2Ds.

### Minimal reproduction project

[bug1.zip](https://github.com/godotengine/godot/files/10609753/bug1.zip)
if (!p_object) {
		InspectorDock::get_inspector_singleton()->edit(nullptr);
		NodeDock::get_singleton()->set_node(nullptr);
		SceneTreeDock::get_singleton()->set_selected(nullptr);
		InspectorDock::get_singleton()->update(nullptr);
		hide_unused_editors();
		return;
	}
	ObjectID id = p_object->get_instance_id();
	if (id != editor_history.get_current()) {
		if (p_inspector_only) {
			editor_history.add_object(id, String(), true);
		} else if (p_property.is_empty()) {
			editor_history.add_object(id);
		} else {
			editor_history.add_object(id, p_property);
		}
	}
	_edit_current();
}
void EditorNode::_save_default_environment() {
	Ref<Environment> fallback = get_tree()->get_root()->get_world_3d()->get_fallback_environment();
	if (fallback.is_valid() && fallback->get_path().is_resource_file()) {
		HashMap<Ref<Resource>, bool> processed;
		_find_and_save_edited_subresources(fallback.ptr(), processed, 0);
		save_resource_in_path(fallback, fallback->get_path());
	}
}
void EditorNode::hide_unused_editors(const Object *p_editing_owner) {