### 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)
push_warning(p_source, p_code, Vector<String>{ p_symbols... });
	}
#endif
	void make_completion_context(CompletionType p_type, Node *p_node, int p_argument = -1, bool p_force = false);
	void make_completion_context(CompletionType p_type, Variant::Type p_builtin_type, bool p_force = false);
	void push_completion_call(Node *p_call);
	void pop_completion_call();
	void set_last_completion_call_arg(int p_argument);
	GDScriptTokenizer::Token advance();
	bool match(GDScriptTokenizer::Token::Type p_token_type);
	bool check(GDScriptTokenizer::Token::Type p_token_type) const;
	bool consume(GDScriptTokenizer::Token::Type p_token_type, const String &p_error_message);
	bool is_at_end() const;
	bool is_statement_end_token() const;
	bool is_statement_end() const;
	void end_statement(const String &p_context);
	void synchronize();
	void push_multiline(bool p_state);
	void pop_multiline();
	
	void parse_program();
	ClassNode *parse_class(bool p_is_static);
	void parse_class_name();
	void parse_extends();
	void parse_class_body(bool p_is_multiline);
	template <class T>
	void parse_class_member(T *(GDScriptParser::*p_parse_function)(bool), AnnotationInfo::TargetKind p_target, const String &p_member_kind, bool p_is_static = false);
	SignalNode *parse_signal(bool p_is_static);