### Godot version

4.2 (c5da2e54fe50cad34b5f93fa10538978b33af88d)

### System information

Windows 11

### Issue description

Attempting to run a scene with the following script report Identifier not found error:

![image](https://github.com/godotengine/godot/assets/3036176/3a63b930-0588-499d-80a2-4f88f5f07116)

This does not happen on 4.1.1 so this is a regression.

### Steps to reproduce

Create a script derived from Control and try to get access to the mouse_entered signal.

### Minimal reproduction project

[TestBug.zip](https://github.com/godotengine/godot/files/12237764/TestBug.zip)

codegen.generator->write_newline(field->initializer->start_line);
			GDScriptCodeGenerator::Address src_address = _parse_expression(codegen, r_error, field->initializer, false, true);
			if (r_error) {
				memdelete(codegen.generator);
				return nullptr;
			}
			GDScriptDataType field_type = _gdtype_from_datatype(field->get_datatype(), codegen.script);
			GDScriptCodeGenerator::Address temp = codegen.add_temporary(field_type);
			if (field->use_conversion_assign) {
				codegen.generator->write_assign_with_conversion(temp, src_address);
			} else {
				codegen.generator->write_assign(temp, src_address);
			}
			if (src_address.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
				codegen.generator->pop_temporary();
			}
			codegen.generator->write_set_static_variable(temp, class_addr, p_script->static_variables_indices[field->identifier->name].index);
			codegen.generator->pop_temporary();
		}
	}
	if (p_script->has_method(GDScriptLanguage::get_singleton()->strings._static_init)) {
		codegen.generator->write_newline(p_class->start_line);
		codegen.generator->write_call(GDScriptCodeGenerator::Address(), class_addr, GDScriptLanguage::get_singleton()->strings._static_init, Vector<GDScriptCodeGenerator::Address>());
	}
#ifdef DEBUG_ENABLED
	if (EngineDebugger::is_active()) {
		String signature;
		
		if (!p_script->get_script_path().is_empty()) {