### Godot version

4.1 Stable

### System information

Linux Mint 21.1 - Godot 4.1 Stable - Vulkan (Forward+) - i7-12700K - RTX 2060

### Issue description

Hi folks!

My project worked back on Godot 4.0.3 but since upgrading to 4.1 the project instantly crashes when testing, with the parser reporting that it was unable to find pretty much all inherited members with the following error:

Parser Error: Identifier not found: [variable name here]

My characters are currently made up of three classes, starting with Actor_Base inheriting from CharacterBody3D, then two child classes named Actor_Simple and Actor_Player_NPC inheriting from Actor_Base, which can be found in the project’s Scripts/Actors folder. 

To explain the problem, two members inherited from Actor_Base that first manifested this problem in my child classes after upgrading were “ActorActive” and “ActorAlive”, both of which appear to be correctly recognised as inherited members from Actor_Base in child scripts by the editor’s script parser, but no longer seem to be detected as inherited members by the in-game script parser, instantly causing a crash.

Commenting out each now-offending variable call revealed it appears to have a problem with pretty much every member inherited from my custom parent class. Putting “self.” at the start of each call appeared to work around the issue, but this meant that another script/node that instances these actors broke as it was unable to access and set the inherited “ActorDefinition” resource member.

As even the editor’s script parser can’t find any issues with these scripts, I am at a loss for what’s happened here.

_Unfortunately as I can’t guarantee that I can reproduce the same symptoms for the same reasons on a minimal project, I have included the entire project as the Minimal Reproduction Project._ 

To reiterate, the project worked just fine back on 4.0.3, but has completely broken since the upgrade, with this issue backporting to 4.0.3 and thus leaving me stranded. I have also tried to start a new project and copy the original files in, which produced the same results.

Any help is greatly appreciated!

-CFR

### Steps to reproduce

Run test on included project

### Minimal reproduction project

[TPAction_Broken_GH.zip](https://github.com/godotengine/godot/files/11981632/TPAction_Broken_GH.zip)

if (E) {
				r_ret = E->value;
				return true;
			}
		}
		{
			HashMap<StringName, GDScript::MemberInfo>::ConstIterator E = sptr->static_variables_indices.find(p_name);
			if (E) {
				if (E->value.getter) {
					Callable::CallError ce;
					r_ret = const_cast<GDScript *>(sptr)->callp(E->value.getter, nullptr, 0, ce);
					return true;
				}
				r_ret = sptr->static_variables[E->value.index];
				return true;
			}
		}
		{
			HashMap<StringName, Vector<StringName>>::ConstIterator E = sptr->_signals.find(p_name);
			if (E) {
				r_ret = Signal(this->owner, E->key);
				return true;
			}
		}
		{
			HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(p_name);
			if (E) {
				if (sptr->rpc_config.has(p_name)) {
					r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key)));
				} else {