This was a temporary solution. Please use the original Primary Input on LockScreen extension. Automatically change the keyboard layout on the lock screen to the first one in your list. This is a small, simple extension that solves an annoying issue for users with several different keyboard layouts (until it gets solved upstream). Whenever the lock screen kicks in, this extension checks for the currently selected keyboard layout and switches it to the main one (the first one in your list of keyboard layouts in Settings). This is a fork and ESM port of the Primary Input on LockScreen extension.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Your previous suggestion of declaring `inputSourceManager` in `enable()` breaks the extension. The only way it actually works (and changes the keyboard layout) is like this, when `const inputSourceManager` is outside the extension class. Also, declaring only the "unlock-dialog" session mode, makes the extension appear disabled when you manage extensions, so I added the "user" session mode as well.
Using `this._inputSourceManager` or `this.#inputSourceManager`doesn't seem to help either.