### Godot version

v4.2.dev.custom_build [ec395516e]

### System information

Linux Mint 21.1 (Vera) - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 515.105.01) - Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 Threads)

### Issue description

When the sub-scene is saved and closed, if it automatically switches to the main scene, then opens the sub-scene again. Later, every time you switch to the main scene, the **Updating Scene** popup will pop up.

```diff
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index af7163eec1..3e08b2f02f 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -662,6 +662,7 @@ bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, HashSet<Str
                if (!checked_paths.has(path)) {
                        uint64_t modified_time = FileAccess::get_modified_time(path);
                        if (modified_time != ss->get_last_modified_time()) {
+                               print_line(p_root, p_node, ss, ss->get_last_modified_time(), modified_time);
                                return true; //external scene changed
                        }
```

In later switches, `ss->get_last_modified_time()` keeps returning `0`.

```output
Main:<Node2D#1762429819445> Sub:<Node2D#1762446543234> <SceneState#-9223370274575945336> 1688862627 1688863516
Main:<Node2D#2462106842463> Sub:<Node2D#2462123619739> <SceneState#-9223369575788120694> 0 1688863516
Main:<Node2D#2677157197217> Sub:<Node2D#2677173974273> <SceneState#-9223369575788120694> 0 1688863516
Main:<Node2D#2781830246877> Sub:<Node2D#2781847025065> <SceneState#-9223369575788120694> 0 1688863516
```

### Steps to reproduce

1. Open MRP, and make sure the main scene and sub scene are opened;
2. Switch to sub scene, save the scene, and close;
3. With switching to the main scene, the **Updating Scene** pop-up window will appear automatically;
4. Open the sub scene again, and switch between the main scene and the sub scene. Whenever you switch to the main scene, the **Updating Scene** pop-up window will appear.


https://github.com/godotengine/godot/assets/30386067/3bf45b6f-ac8c-4188-8158-9e5e2130bd88



### Minimal reproduction project

[update-scene-issue.zip](https://github.com/godotengine/godot/files/11992813/update-scene-issue.zip)

Node *instantiate(GenEditState p_edit_state) const;
	Ref<SceneState> get_base_scene_state() const;
	void update_instance_resource(String p_path, Ref<PackedScene> p_packed_scene);
	
	int get_node_count() const;
	StringName get_node_type(int p_idx) const;
	StringName get_node_name(int p_idx) const;
	NodePath get_node_path(int p_idx, bool p_for_parent = false) const;
	NodePath get_node_owner_path(int p_idx) const;
	Ref<PackedScene> get_node_instance(int p_idx) const;
	String get_node_instance_placeholder(int p_idx) const;
	bool is_node_instance_placeholder(int p_idx) const;
	Vector<StringName> get_node_groups(int p_idx) const;
	int get_node_index(int p_idx) const;
	int get_node_property_count(int p_idx) const;
	StringName get_node_property_name(int p_idx, int p_prop) const;
	Variant get_node_property_value(int p_idx, int p_prop) const;
	Vector<String> get_node_deferred_nodepath_properties(int p_idx) const;
	int get_connection_count() const;
	NodePath get_connection_source(int p_idx) const;
	StringName get_connection_signal(int p_idx) const;
	NodePath get_connection_target(int p_idx) const;
	StringName get_connection_method(int p_idx) const;
	int get_connection_flags(int p_idx) const;
	int get_connection_unbinds(int p_idx) const;
	Array get_connection_binds(int p_idx) const;
	bool has_connection(const NodePath &p_node_from, const StringName &p_signal, const NodePath &p_node_to, const StringName &p_method, bool p_no_inheritance = false);
	Vector<NodePath> get_editable_instances() const;
	
	int add_name(const StringName &p_name);