### Godot version

v4.1.dev.custom_build [a8453cb33]

### System information

Windows 11, Core i5-12400F, RX 6600

### Issue description

in recent custom 4.1 builds it is regening every ext id on every save even if just one simple file

	[gd_scene load_steps=2 format=3 uid="uid://bj3w1run711x7"]

	[ext_resource type="Texture2D" uid="uid://c082xolc76p8n" path="res://icon.svg" id="1_ftki2"]

	[node name="Node2D" type="Node2D"]

	[node name="Sprite2D" type="Sprite2D" parent="."]
	position = Vector2(351, 294)
	texture = ExtResource("1_ftki2")

can use a script like this save all files and regen all ext ids in project

	@tool
	extends EditorScript

	func listFiles(path: String, extensions: Array = []) -> Array:
		var list := []
		for dir in DirAccess.get_directories_at(path):
			if not dir.begins_with("."):
				list.append_array(listFiles(path + dir + "/", extensions))
		for file in DirAccess.get_files_at(path):
			var ext := file.split(".")[-1]
			if not file.begins_with(".") and ext != "import":
				if extensions.is_empty() or ext in extensions:
					list.append(path + file)
		return list

	func _run() -> void:
		for file in listFiles("res://", ["tscn", "tres"]):
			ResourceSaver.save(load(file))

in 4.0.2 this script does not regen every ext id in the project each time it is run (just when needed) but in latest 4.1 it does
but just ctrl+s works'nt too

thanks

thought it was related to this but maybe not
https://github.com/godotengine/godot/issues/76693

### Steps to reproduce

- make new scene with ext resource (new control, new sprite, set texture to icon)
1 - save, stage changes
2 - goto 1

or can use script on any project to see that it applies to everything, everywhere, all at once


### Minimal reproduction project

n/a
f->store_string(" instance_placeholder=");
				VariantWriter::write_to_string(instance_placeholder, vars, _write_resources, this);
				f->store_string(vars);
			}
			if (instance.is_valid()) {
				String vars;
				f->store_string(" instance=");
				VariantWriter::write_to_string(instance, vars, _write_resources, this);
				f->store_string(vars);
			}
			f->store_line("]");
			for (int j = 0; j < state->get_node_property_count(i); j++) {
				String vars;
				VariantWriter::write_to_string(state->get_node_property_value(i, j), vars, _write_resources, this);
				f->store_string(String(state->get_node_property_name(i, j)).property_name_encode() + " = " + vars + "\n");
			}
			if (i < state->get_node_count() - 1) {
				f->store_line(String());
			}
		}
		for (int i = 0; i < state->get_connection_count(); i++) {
			if (i == 0) {
				f->store_line("");
			}
			String connstr = "[connection";
			connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
			connstr += " from=\"" + String(state->get_connection_source(i).simplified()) + "\"";
			connstr += " to=\"" + String(state->get_connection_target(i).simplified()) + "\"";
			connstr += " method=\"" + String(state->get_connection_method(i)) + "\"";
			int flags = state->get_connection_flags(i);