### Godot version

v4.0.rc1.official [8843d9ad3]

### System information

Windows 11 Pro 64Bit

### Issue description

Hi,

Found a rather annoying bug in 4.0 RC1 official on Windows 11:
When right clicking on a function in code and selecting "Lookup Symbol" - it does not always work?
Sometimes it works, sometimes it does not work?

Any ideas?

Jesse

### Steps to reproduce

Right click on a function in code and select "Lookup Symbol".
(it does not work always?)

### Minimal reproduction project

N.A.
c.current_class = base_type.class_type;
						c.current_function = const_cast<GDScriptParser::FunctionNode *>(method);
						c.current_suite = method->body;
						_find_last_return_in_block(c, last_return_line, &last_returned_value);
						if (last_returned_value) {
							c.current_line = c.current_suite->end_line;
							if (_guess_expression_type(c, last_returned_value, r_type)) {
								return true;
							}
						}
					}
				}
				base_type = base_type.class_type->base_type;
				break;
			case GDScriptParser::DataType::SCRIPT: {
				Ref<Script> scr = base_type.script_type;
				if (scr.is_valid()) {
					List<MethodInfo> methods;
					scr->get_script_method_list(&methods);
					for (const MethodInfo &mi : methods) {
						if (mi.name == p_method) {
							r_type = _type_from_property(mi.return_val);
							return true;
						}
					}
					Ref<Script> base_script = scr->get_base_script();
					if (base_script.is_valid()) {
						base_type.script_type = base_script;
					} else {
						base_type.kind = GDScriptParser::DataType::NATIVE;