### 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)

bar->hide();
	shader_editor->set_find_replace_bar(bar);
	warnings_panel = memnew(RichTextLabel);
	warnings_panel->set_custom_minimum_size(Size2(0, 100 * EDSCALE));
	warnings_panel->set_h_size_flags(SIZE_EXPAND_FILL);
	warnings_panel->set_meta_underline(true);
	warnings_panel->set_selection_enabled(true);
	warnings_panel->set_context_menu_enabled(true);
	warnings_panel->set_focus_mode(FOCUS_CLICK);
	warnings_panel->hide();
	warnings_panel->connect("meta_clicked", callable_mp(this, &TextShaderEditor::_warning_clicked));
	editor_box->add_child(warnings_panel);
	shader_editor->set_warnings_panel(warnings_panel);
	goto_line_dialog = memnew(GotoLineDialog);
	add_child(goto_line_dialog);
	disk_changed = memnew(ConfirmationDialog);
	VBoxContainer *vbc = memnew(VBoxContainer);
	disk_changed->add_child(vbc);
	Label *dl = memnew(Label);
	dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?"));
	vbc->add_child(dl);
	disk_changed->connect("confirmed", callable_mp(this, &TextShaderEditor::_reload));
	disk_changed->set_ok_button_text(TTR("Reload"));
	disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
	disk_changed->connect("custom_action", callable_mp(this, &TextShaderEditor::save_external_data));
	trim_trailing_whitespace_on_save = EDITOR_GET("text_editor/behavior/files/trim_trailing_whitespace_on_save");
	add_child(disk_changed);
	_editor_settings_changed();
}