How to prevent the keyboard layout from changing?

I'm using a standard USB keyboard with my MacBook, added a custom keyboard layout (in Library/Keyboard Layouts) and it works fine, but mac OS keeps switching back to the default layout after a few minutes.

update: I just noticed that it switches when I focus the Microsoft Outlook App. Strange. Sadly setting the language of outlook to English doesn't solve that.

I tried deleting the file Library/Preferences/com.apple.HIToolbox.plist (as suggested in similar questions) but it didn't help.

I'm currently running Catalina 10.15.3

enter image description here


Solution 1:

update: I just noticed it happens with other programs too (for example mac OS' own Notes app) :(

I consider this is a weird quirk of Microsoft Outlook. See here for more details: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_mac/disable-automatically-switch-keyboard-to-match/717be469-2267-483b-9d66-7f9e77fac01e

I guess I'll use the Outlook Webapp from now on sigh