It picks the spool based upon which is the lowest number slot. So order it’ll pick 1 > 2 > 3 > 4. So you typically place the most used spool to the left of the one you want as the refill. If you are seeing something else, then it may be a bug or something else.
Some things to look at or consider:
Make sure that you are syncing your filaments to what’s currently in your printer