Keyboard locale keeps changing on me

Let me state my problem as simple as I can:

I have a laptop (Thinkpad T480s) with a US keboard layout, and an external mechanical keyboard (Keychron K2) with the same layout.

I set my system language to English, but I set my formats to Spanish, because that’s what I use the most, even though I prefer my keyboard layout to be US.

Finally: the variant I use for my keyboard is US, intl. with dead keys, just so I can have Spanish accents like so: á é í ó ú and Spanish letter ñ.

My problem is that, at some point in a session, without doing anything special, and with my input sources still configured in the Gnome settings as English (US, intl. with dead keys), the input will be changed. I can no longer type Spanish accents (which would be ' key followed by the vowel letter I want to accentuate). It just ignores the first key press, and inserts the letter without the accent.

Since the keyboard layout is properly set in the Gnome settings, I don’t know what I can do… And then if I add a second layout, select it, and select back my desired one, most of the times it will work and I will have my accents back… But not always! And only for a while, because some minutes down the road, it will happen again.

I’m out of ideas. I have set my locales properly, I have done stuff like setxkbmap us -variant intl

Has this happened to someone else? Can you help me?

Thanks in advance

I’d like to ask, is the issue app-specific or is it system-wide? It sounds like a font-related issue rather than a locale-related one, to me at least