### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

16.0.0-beta.3

### What operating system are you using?

Other Linux

### Operating System Version

Linux pop-os 5.13.0-7614-generic #&#x2060;14\~1631647151\~21.04\~930e87c-Ubuntu

### What arch are you using?

x64

### Last Known Working Electron version

15.3.0

### Expected Behavior

From the documentation for `app.getPath("userData")` (https://www.electronjs.org/docs/latest/api/app#appgetpathname):
> The directory for storing your app's configuration files, which by default it is the appData directory appended with your app's name.

So `app.getPath("userData")` in the linked gist should be `~/.config/test-electron`.

### Actual Behavior

`app.getName()` returns the correct name from package.json but `app.getPath("userData")` returns `~/.config/Electron`.

### Testcase Gist URL

https://gist.github.com/weedz/ad42b854df4e5bc411d18e48ae1c91df

### Additional Information

Found this issue which might be relevant https://github.com/electron/electron/issues/30112.

Same result in the following devcontainer https://gist.github.com/weedz/c962d69078391115635772b279264c02.
shell/browser/electron_browser_client.cc
#include "components/net_log/chrome_net_log.h"
#include "components/network_hints/common/network_hints.mojom.h"
#include "content/browser/keyboard_lock/keyboard_lock_service_impl.h"  
#include "content/browser/site_instance_impl.h"  
#include "content/public/browser/browser_main_runner.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/login_delegate.h"
#include "content/public/browser/overlay_window.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/service_worker_version_base_info.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/tts_controller.h"
#include "content/public/browser/tts_platform.h"
#include "content/public/common/content_descriptors.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "electron/buildflags/buildflags.h"
#include "electron/grit/electron_resources.h"
#include "electron/shell/common/api/api.mojom.h"
#include "mojo/public/cpp/bindings/binder_map.h"
#include "net/base/escape.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/buildflags/buildflags.h"
#include "ppapi/host/ppapi_host.h"
#include "printing/buildflags/buildflags.h"