Repository: godot
Issue: Godot server crashes on exported projects when a C# script calls native OS functions, due to mono not findind dll
Labels: bug,platform:linuxbsd,topic:dotnet,topic:export

### Godot version

3.5.1

### System information

Ubuntu 22.04

### Issue description

When running a project containing a C# script that calls native OS functions (`System.IO.FileSystem.FileExists` for example) exported as PCK, Godot server crashes:
```
System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null)
```
It works fine (i.e., does not crash) if I use Godot desktop, or if I put the godot server binary in the same folder as the pck file.

Full logs:
```
System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
  at Interop+Sys..cctor () [0x00000] in <02071a39c8a34187bdd1f58e4be38764>:0 
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.IO.File.Exists (System.String path) [0x00043] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo.TryLoadTzFile (System.String tzFilePath, System.Byte[]& rawData, System.String& id) [0x00000] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo.TryGetLocalTzFile (System.Byte[]& rawData, System.String& id) [0x0000f] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo.GetLocalTimeZoneFromTzFile () [0x00000] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo.GetLocalTimeZone (System.TimeZoneInfo+CachedData cachedData) [0x00000] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo+CachedData.CreateLocal () [0x00018] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo+CachedData.get_Local () [0x0000c] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo.get_Local () [0x00000] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) [0x00000] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at System.DateTime.get_Now () [0x00008] in <02071a39c8a34187bdd1f58e4be38764>:0 
  at PrintDate._Ready () [0x00000] in <3dd98c360c43422ca4c94e6dd2f20860>:0 
```
Mono logs:
```
DllImport unable to load library 'System.Native'. (in domain Mono, warning)
DllImport unable to load library 'System.Native'. (in domain Mono, warning)
DllImport unable to load library 'System.Native'. (in domain Mono, warning)
DllImport unable to load library 'System.Native'. (in domain Mono, warning)
DllImport unable to load library 'System.Native'. (in domain Mono, warning)
```

### Steps to reproduce

- Create a new project
- Attach a C# script to a node, calling at least one OS function (in my example, I used `DateTime.Now`, which calls `FileSystem.FileExists`
- Export the project as PCK (uncheck debug to be able to run it with godot server)
- Run with godot server: `/path/to/godot_server --main-pack your_exported_project.pck` (godot_server not being in the same directory as the pck file).

### Minimal reproduction project

https://github.com/Yohsi/print_date