### Godot version

v4.0.beta.custom_build [fab9926a9]

### System information

Fedora 37

### Issue description

When creating a new inherited scene, saving the scene (for example with Ctrl+S) defaults to overwriting the scene being inherited, instead of prompting for a location to save to.

### Steps to reproduce

1. Create a new inherited scene
2. Press Ctrl+S

If the scene being inherited is imported (for example from a glTF), an error displays. If the inherited scene is a .tscn or .scn, it gets overridden by an inherited scene that tries to inherit itself, which is impossible and thus corrupt.

### Minimal reproduction project

N/A
}
		return ERR_FILE_MISSING_DEPENDENCIES;
	}
	dependency_errors.erase(lpath); 
	for (KeyValue<String, HashSet<String>> &E : dependency_errors) {
		String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n";
		for (const String &F : E.value) {
			txt += "\t" + F + "\n";
		}
		add_io_error(txt);
	}
	if (ResourceCache::has(lpath)) {
		
		Ref<PackedScene> ps = ResourceCache::get_ref(lpath);
		if (ps.is_valid()) {
			ps->replace_state(sdata->get_state());
			ps->set_last_modified_time(sdata->get_last_modified_time());
			sdata = ps;
		}
	} else {
		sdata->set_path(lpath, true); 
	}
	Node *new_scene = sdata->instantiate(p_set_inherited ? PackedScene::GEN_EDIT_STATE_MAIN_INHERITED : PackedScene::GEN_EDIT_STATE_MAIN);
	if (!new_scene) {
		sdata.unref();
		_dialog_display_load_error(lpath, ERR_FILE_CORRUPT);
		opening_prev = false;
		if (prev != -1) {
			set_current_scene(prev);
			editor_data.remove_scene(idx);