Aren't the sort done by color and energy cost?
The 2 colors in your deck are sorted before the rest, at energy cost.
remake a random deck in your colors and reload the card screen and all cards are sorted first. At least it seem to be like that here.
A bit much and I do hope for an easier function to this. I miss it when I am upgrading cards that aren't in the deck.