### Godot version

4.0.beta10

### System information

Windows 11

### Issue description
UPDATE: This problem only occurs when the source code contains inner classes

Before 4.0.Beta9, I could get a GDScript instance by `GDScript.new()` and then set the `source_code` property and then `reload()`, but now it throws an error 
```
USER SCRIPT ERROR: Parse Error: Could not find script "".
   at: GDScript::reload (built-in:1644)
```
In my software, I use the above method when the user modifies the code text, and then read the godot log to implement real-time error checking of the custom user script editor. But now this functionality is completely broken

### Steps to reproduce

1. Create a GDScript instance by `GDScript.new()`
2. set the `source_code` property and then `reload()`

### Minimal reproduction project

N/A
if (subclass->extends.size() == 0) {
							get_global_class_name(subclass->extends_path, r_base_type);
							subclass = nullptr;
							break;
						} else {
							Vector<StringName> extend_classes = subclass->extends;
							Ref<FileAccess> subfile = FileAccess::open(subclass->extends_path, FileAccess::READ);
							if (subfile.is_null()) {
								break;
							}
							String subsource = subfile->get_as_utf8_string();
							if (subsource.is_empty()) {
								break;
							}
							String subpath = subclass->extends_path;
							if (subpath.is_relative_path()) {
								subpath = path.get_base_dir().path_join(subpath).simplify_path();
							}
							if (OK != subparser.parse(subsource, subpath, false)) {
								break;
							}
							path = subpath;
							subclass = subparser.get_tree();
							while (extend_classes.size() > 0) {
								bool found = false;
								for (int i = 0; i < subclass->members.size(); i++) {
									if (subclass->members[i].type != GDScriptParser::ClassNode::Member::CLASS) {
										continue;
									}
									const GDScriptParser::ClassNode *inner_class = subclass->members[i].m_class;