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

if (!p_enum_hint.contains(".")) {
		
		StringName current_enum = p_enum_hint;
		if (p_context.current_class && p_context.current_class->has_member(current_enum) && p_context.current_class->get_member(current_enum).type == GDScriptParser::ClassNode::Member::ENUM) {
			const GDScriptParser::EnumNode *_enum = p_context.current_class->get_member(current_enum).m_enum;
			for (int i = 0; i < _enum->values.size(); i++) {
				ScriptLanguage::CodeCompletionOption option(_enum->values[i].identifier->name, ScriptLanguage::CODE_COMPLETION_KIND_ENUM);
				r_result.insert(option.display, option);
			}
		} else {
			for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) {
				if (CoreConstants::get_global_constant_enum(i) == current_enum) {
					ScriptLanguage::CodeCompletionOption option(CoreConstants::get_global_constant_name(i), ScriptLanguage::CODE_COMPLETION_KIND_ENUM);
					r_result.insert(option.display, option);
				}
			}
		}
	} else {
		String class_name = p_enum_hint.get_slice(".", 0);
		String enum_name = p_enum_hint.get_slice(".", 1);
		if (!ClassDB::class_exists(class_name)) {
			return;
		}
		List<StringName> enum_constants;
		ClassDB::get_enum_constants(class_name, enum_name, &enum_constants);