Static typing prevents GDScript parsing in runtime-loaded resource packs

That’s expected as the pack loader project does not have that class registered so it does not know it exists.

I don’t think it’s possible to do what you want to do but feel free to open an issue here Issues · godotengine/godot · GitHub explaining what you want to do and the problem you are facing.