https://github.com/oomol-lab/LockIME
A native macOS menu-bar app that keeps your keyboard input source locked — global, per-app, and per-URL.