Re: Surprising bug
"swaps the keyboard layout from UK to US"
Take a look at what ibus might be doing.
Zoom does this, at least on Devuan & Debian. The actual culprit is ibus which gets installed because the Zoom deb lists it as a dependency. There's a workaround which involves unpacking the deb, editing out the dependency and repackaging. Whether that would work with a Teams install is a different matter.