Refine the "Force keyboard" setting under Settings > Keys: when enabled,
the selected keyboard layout can be forced only once per session, the
first time a newly created terminal receives keyboard focus, instead of
being forced continuously while iTerm2 is active. This lets you switch
layouts within a session without iTerm2 snapping the layout back, and it
leaves the keyboard in place on resign (relying on macOS per-document
input-source tracking). Restored sessions are not affected.
Co-authored-by: George Nachman <gnachman@gmail.com>