### Godot version

v4.2.dev.custom_build [eca6f0eb5]

### System information

Windows 10, Forward+, NVIDIA GeForce GTX 1050 Ti (31.0.15.3623)

### Issue description

When I edit my .gdshaderinc (a shader include file that I use for glsl shaders) file outside of Godot; and I go back to the Godot editor; it asks me if I want to `resave`, `reload` or `cancel`.
- `Resave` will revert the changes I made outside of Godot.
- `Reload` will use the changes I made outside of Godot.
- `Cancel` will do neither.

So I choose `reload` because I want to use the changes made outside the Godot editor.

However, every time I do, I get the following error message
```
editor\plugins\text_shader_editor.cpp:181 - Condition "shader.is_null()" is true.
```

### Steps to reproduce

- Make a .gdshaderinc file with for example some constants
- Make a .glsl file including the .gdshaderinc file
- Open the project with the Godot editor
- Edit and save the .gdshaderinc file outside of Godot
- Give focus to the Godot editor and choose `resave`
- Observe error

### Minimal reproduction project

This project contains a glsl_shader.glsl including a glsl_include.gdshaderinc file.
[MRP-shader-include-error.zip](https://github.com/godotengine/godot/files/12490157/MRP-shader-include-error.zip)

shader_editor->update_editor_settings();
	shader_editor->get_text_editor()->add_theme_constant_override("line_spacing", EDITOR_GET("text_editor/appearance/whitespace/line_spacing"));
	shader_editor->get_text_editor()->set_draw_breakpoints_gutter(false);
	shader_editor->get_text_editor()->set_draw_executing_lines_gutter(false);
	trim_trailing_whitespace_on_save = EDITOR_GET("text_editor/behavior/files/trim_trailing_whitespace_on_save");
}
void TextShaderEditor::_show_warnings_panel(bool p_show) {
	warnings_panel->set_visible(p_show);
}
void TextShaderEditor::_warning_clicked(Variant p_line) {
	if (p_line.get_type() == Variant::INT) {
		shader_editor->get_text_editor()->set_caret_line(p_line.operator int64_t());
	}
}
void TextShaderEditor::_bind_methods() {
	ClassDB::bind_method("_show_warnings_panel", &TextShaderEditor::_show_warnings_panel);
	ClassDB::bind_method("_warning_clicked", &TextShaderEditor::_warning_clicked);
	ADD_SIGNAL(MethodInfo("validation_changed"));
}
void TextShaderEditor::ensure_select_current() {
}
void TextShaderEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
	shader_editor->goto_line_selection(p_line, p_begin, p_end);
}
void TextShaderEditor::_project_settings_changed() {
	_update_warnings(true);
}
void TextShaderEditor::_update_warnings(bool p_validate) {