Well Paul, that’s not embarrassing, it’s very fortunate :-)
Maybe you didn’t log out after you installed your keyboard layout and that omission caused the erratic behavior.
Often, it seems everything is working well without doing that, but it’s the "best practice" method still.
I know you wrote you didn’t log out between misbehavior and proper behavior, but that’s the only thing I can come up with.
And regarding the accented-character problem, I still remember the mid ’90s, when exchanging documents between PCs and Macs was always hazardous, and when people were typing e1, e3, etc. on their
portable Epson machines in French texts meant for uploading to a Mac (Plus or SE) where those codes would be globally replaced by é, ê, etc.. Unicode was only a baby then.