Forgot to mention: when I’m adding a context with a higher priority, everything seems fine.
In this case I add one context and remove the other, all with priority 0.
Basically, I switch between game inputs and UI inputs, and I do it this way because there are a lot more game inputs than UI inputs, and to simply use a context with a higher priority would mean I’d have to override all the bindings of the game context, which seems unnecessary.
The order of adding a new context and removing the old one doesn’t make a difference.