Hello,
I've been using Xfce4 for years, with multiple keyboard layouts. Until
recently, the layouts were managed globally, across applications;
recently, this somehow switched to per application - I don't know why.
When I eventually realized what was going on, I looked for a setting
that controlled this, and it seems that such a configuration knob is
only available via the Properties of the Xfce4 xkb plugin. I suggest
that this setting be exposed in the Keyboard section of the Settings
Manager.
https://askubuntu.com/questions/938103/xubuntu-17-04-different-keyboard-layout-for-each-window