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

ERR_FAIL_COND(err_positions.size() == 0);
		String err_text = error_pp;
		int err_line = err_positions.front()->get().line;
		if (err_positions.size() == 1) {
			
			err_text = "error(" + itos(err_line) + "): " + err_text;
		} else {
			err_text = "error(" + itos(err_line) + ") in include " + err_positions.back()->get().file.get_file() + ":" + itos(err_positions.back()->get().line) + ": " + err_text;
			set_error_count(err_positions.size() - 1);
		}
		set_error(err_text);
		set_error_pos(err_line - 1, 0);
		for (int i = 0; i < get_text_editor()->get_line_count(); i++) {
			get_text_editor()->set_line_background_color(i, Color(0, 0, 0, 0));
		}
		get_text_editor()->set_line_background_color(err_line - 1, marked_line_color);
		set_warning_count(0);
	} else {
		ShaderLanguage sl;
		sl.enable_warning_checking(saved_warnings_enabled);
		uint32_t flags = saved_warning_flags;
		if (shader.is_null()) {
			if (flags & ShaderWarning::UNUSED_CONSTANT) {
				flags &= ~(ShaderWarning::UNUSED_CONSTANT);
			}
			if (flags & ShaderWarning::UNUSED_FUNCTION) {
				flags &= ~(ShaderWarning::UNUSED_FUNCTION);
			}
			if (flags & ShaderWarning::UNUSED_STRUCT) {