### Tested versions

- Reproducible in: 4.2.1 Stable
- Testing working functionality in: 4.2 Stable and 4.1 Stable

### System information

Windows 11 - Godot v4.2.1-stable - Vulkan (Forward+)

### Issue description

I have a timer as shown in the attached image. When I tried to drag the timer to the script and use the dot notation to autocomplete the in-built functions of the Timer class, I didn't get suggestions.

While in v4.1 opening the same project gave intellisense.
![image](https://github.com/godotengine/godot/assets/29101013/5e5088d9-8e61-4d4b-a5b4-8deb37cd915b)


### Steps to reproduce

1. Create a Timer
2. Drag and drop in the gdscript editor.
3. Try to invoke the start method.

### Minimal reproduction project (MRP)

[Test DnD.zip](https://github.com/godotengine/godot/files/13658039/Test.DnD.zip)

}
	
	HashMap<StringName, ProjectSettings::AutoloadInfo> autoloads = ProjectSettings::get_singleton()->get_autoload_list();
	for (const KeyValue<StringName, ProjectSettings::AutoloadInfo> &E : autoloads) {
		const ProjectSettings::AutoloadInfo &info = E.value;
		if (!info.is_singleton || info.path.get_extension().to_lower() != "gd") {
			continue;
		}
		ScriptLanguage::CodeCompletionOption option(info.name, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
		r_result.insert(option.display, option);
	}
}
static void _find_identifiers_in_suite(const GDScriptParser::SuiteNode *p_suite, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth = 0) {
	for (int i = 0; i < p_suite->locals.size(); i++) {
		ScriptLanguage::CodeCompletionOption option;
		int location = p_recursion_depth == 0 ? ScriptLanguage::LOCATION_LOCAL : (p_recursion_depth | ScriptLanguage::LOCATION_PARENT_MASK);
		if (p_suite->locals[i].type == GDScriptParser::SuiteNode::Local::CONSTANT) {
			option = ScriptLanguage::CodeCompletionOption(p_suite->locals[i].name, ScriptLanguage::CODE_COMPLETION_KIND_CONSTANT, location);
			option.default_value = p_suite->locals[i].constant->initializer->reduced_value;
		} else {
			option = ScriptLanguage::CodeCompletionOption(p_suite->locals[i].name, ScriptLanguage::CODE_COMPLETION_KIND_VARIABLE, location);
		}
		r_result.insert(option.display, option);
	}
	if (p_suite->parent_block) {
		_find_identifiers_in_suite(p_suite->parent_block, r_result, p_recursion_depth + 1);
	}
}
static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base, bool p_only_functions, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth);
static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class, bool p_only_functions, bool p_static, bool p_parent_only, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, int p_recursion_depth) {