### Godot version

4.0.beta10

### System information

Windows 10

### Issue description

For top-level class variables, a lambda stored in a dictionary cannot reference the dictionary members.

### Steps to reproduce

Assuming `MyAutoload.gd` is an autoload class, this code that worked in beta 8, no longer works in beta 10.

```gdscript
var f = func():
	MyAutoload.MyDict._str = "New string."

var MyDict: Dictionary = {
	"_str": "",
	"fun": f
}

# Parser Error: Could not resolve member "_OtherClass".
```

Autoload is unrelated however, just wanted to demonstrate how there's an inconsistent error if this is intended behavior. The following occurs regardless of autoload. If the "MyAutoload" part is removed from the lambda, a "cyclic reference" error occurs.
```gdscript
var f = func():
	MyDict._str = "New string."

var MyDict: Dictionary = {
	"_str": "",
	"fun": f
}

# Parser Error: Could not resolve member "f": Cyclic reference
```

### Minimal reproduction project

[Issue_70592_BugProject.zip](https://github.com/godotengine/godot/files/10304077/Issue_70592_BugProject.zip)
Error check_class_member_name_conflict(const GDScriptParser::ClassNode *p_class_node, const StringName &p_member_name, const GDScriptParser::Node *p_member_node);
	void get_class_node_current_scope_classes(GDScriptParser::ClassNode *p_node, List<GDScriptParser::ClassNode *> *p_list);
	Error resolve_class_inheritance(GDScriptParser::ClassNode *p_class, const GDScriptParser::Node *p_source = nullptr);
	Error resolve_class_inheritance(GDScriptParser::ClassNode *p_class, bool p_recursive);
	GDScriptParser::DataType resolve_datatype(GDScriptParser::TypeNode *p_type);
	void decide_suite_type(GDScriptParser::Node *p_suite, GDScriptParser::Node *p_statement);
	void resolve_annotation(GDScriptParser::AnnotationNode *p_annotation);
	void resolve_class_member(GDScriptParser::ClassNode *p_class, StringName p_name, const GDScriptParser::Node *p_source = nullptr);
	void resolve_class_member(GDScriptParser::ClassNode *p_class, int p_index, const GDScriptParser::Node *p_source = nullptr);
	void resolve_class_interface(GDScriptParser::ClassNode *p_class, const GDScriptParser::Node *p_source = nullptr);
	void resolve_class_interface(GDScriptParser::ClassNode *p_class, bool p_recursive);
	void resolve_class_body(GDScriptParser::ClassNode *p_class, const GDScriptParser::Node *p_source = nullptr);
	void resolve_class_body(GDScriptParser::ClassNode *p_class, bool p_recursive);
	void resolve_function_signature(GDScriptParser::FunctionNode *p_function, const GDScriptParser::Node *p_source = nullptr, bool p_is_lambda = false);
	void resolve_function_body(GDScriptParser::FunctionNode *p_function, bool p_is_lambda = false);
	void resolve_node(GDScriptParser::Node *p_node, bool p_is_root = true);
	void resolve_suite(GDScriptParser::SuiteNode *p_suite);
	void resolve_assignable(GDScriptParser::AssignableNode *p_assignable, const char *p_kind);
	void resolve_variable(GDScriptParser::VariableNode *p_variable, bool p_is_local);
	void resolve_constant(GDScriptParser::ConstantNode *p_constant, bool p_is_local);
	void resolve_parameter(GDScriptParser::ParameterNode *p_parameter);
	void resolve_if(GDScriptParser::IfNode *p_if);
	void resolve_for(GDScriptParser::ForNode *p_for);
	void resolve_while(GDScriptParser::WhileNode *p_while);
	void resolve_assert(GDScriptParser::AssertNode *p_assert);
	void resolve_match(GDScriptParser::MatchNode *p_match);
	void resolve_match_branch(GDScriptParser::MatchBranchNode *p_match_branch, GDScriptParser::ExpressionNode *p_match_test);
	void resolve_match_pattern(GDScriptParser::PatternNode *p_match_pattern, GDScriptParser::ExpressionNode *p_match_test);
	void resolve_return(GDScriptParser::ReturnNode *p_return);