Repository: godot
Issue: Application crashes on initial export and installation to Android device using C# 
Labels: bug,platform:android,topic:porting,confirmed,topic:dotnet,crash

### Tested versions

- Reproducible in Godot 4.3-mono, godot-4.4-dev4-mono

### System information

Windows/MacOS - Compatibility, Mobile, Forward+
.NET version - .net7.0

### Issue description

Deploying my Godot Mono application (C#) to any Android device (AAB or APK) either from Windows 11 to a freshly configured MacOS environment produces the crash logs posted below, having 'verbose stdout' enabled. This occurs 9/10 times deploying my application. It does not occur with a fresh project and I've tried disabling all plugins/addons/autoloads while also starting the application to a new and basic scene. This does not prevent crashing. This issue prevents me from going to a Production release in the Play Console as Application Not Responding (ANR) errors are monitored by Google. I've read open issues and tried upgrading to the Godot 4.4 dev-3 and Godot 4.4 dev-4 version without any change. 

Because I believed it might have been my exporting Windows 11 environment I set up my MacOS device from scratch to rule out my environment in which I was able to produce this error exactly. 

When distributing my application through either AAB or APK every installing user reports an initial crash on installation. 

```
--------- beginning of main
11-10 14:37:53.885 15743 15775 I godot   : Godot Engine v4.3.stable.mono.official.77dcf97d8 - https://godotengine.org
11-10 14:37:53.895 15743 15775 I godot   : TextServer: Added interface "Dummy"
11-10 14:37:53.977 15743 15775 I godot   : TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
11-10 14:37:53.997 15743 15775 I godot   : Using "default" pen tablet driver...
11-10 14:37:54.357 15743 15775 I godot   : OpenGL API OpenGL ES 3.2 V@0615.74 (GIT@dad4038ba6, If56d4a5bb8, 1690544947) (Date:07/28/23) - Compatibility - Using Device: Qualcomm - Adreno (TM) 730
11-10 14:37:54.375 15743 15775 I godot   : 
11-10 14:37:54.375 15743 15775 I godot   : TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
11-10 14:37:54.470 15743 15775 I godot   : .NET: Initializing module...
11-10 14:37:55.131 15743 15775 E godot   : USER ERROR: Cannot change current directory to 'cs'.
11-10 14:37:55.131 15743 15775 E godot   :    at: _copy_dir (core/io/dir_access.cpp:451)
11-10 14:37:55.133 15743 15775 E godot   : USER ERROR: Condition "da->copy_dir(packed_path, data_dir_root) != OK" is true.
11-10 14:37:55.133 15743 15775 E godot   :    at: _GodotSharpDirs (modules/mono/godotsharp_dirs.cpp:198)
11-10 14:37:55.133 15743 15775 E godot   : USER ERROR: Can't open dynamic library: GAMENAME.so. Error: dlopen failed: library "GAMENAME.so" not found.
11-10 14:37:55.133 15743 15775 E godot   :    at: open_dynamic_library (platform/android/os_android.cpp:240)
11-10 14:37:55.133 15743 15775 E godot   : USER ERROR: .NET: Failed to load hostfxr
11-10 14:37:55.133 15743 15775 E godot   :    at: initialize (modules/mono/mono_gd/gd_mono.cpp:393)
11-10 14:37:55.240 15743 15775 I godot   : CORE API HASH: 1186918252
11-10 14:37:55.241 15743 15775 I godot   : EDITOR API HASH: 3138346866
```

My .csproj file

```
<Project Sdk="Godot.NET.Sdk/4.3.0">
  <PropertyGroup>
    <TargetFramework>net7.0</TargetFramework>
    <EnableDynamicLoading>true</EnableDynamicLoading>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="DotNetty.Codecs" Version="0.7.5" />
    <PackageReference Include="DotNetty.Common" Version="0.7.5" />
    <PackageReference Include="DotNetty.Handlers" Version="0.7.5" />
    <PackageReference Include="Firebelley.GodotUtilities" Version="4.1.2" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="client.cfg" />
    <Content Include="client.cfg.acc" />
    <Content Include="client.cfg.local" />
    <Content Include="client.cfg.prod" />
  </ItemGroup>
</Project>
```

### Steps to reproduce

Either:

1. Remote Debug the application and wait for installation to observe the crash on your device
2. Open it again to observe it run regularly 

OR

1. Install the APK manually from your Android device and observe the crash on first run of the installed application
2. Open it again to observe it run regularly 


### Minimal reproduction project (MRP)

I am unable to reproduce the issue in a simple project as of now.  An APK that exhibits the given problem can be download ed from this [direct link](https://mega.nz/file/ATV0UbaI#sMNqF8o4DPrhf6O-44VXmdYD2v6EXWsn2_xexdk1rRU) (it's too big for an attachment on Github).