Variants configuration lines will always retain their original order from when you first added them, according to the SKU starting each line. When you first configure Variants for a product, the config lines get added to our database as-is in the same order you provided them, so subsequent changes just get applied for each SKU's existing entry in the database where it already is, and any new lines would get added to the bottom. Viewing an existing product's Variants configuration just reads off those lines from the database as-is, in the same order the database already has them stored.
In order to change the sorting order of Variants lines, first make sure you have the config lines in the order you want saved to a separate file. Edit the product in Seller Admin, disable Variants, and click Next until you can Submit changes; this will remove that product's original Variants config lines from our database. Then you can edit the product again, re-enable Variants, and paste in the config lines you'd saved in the order you want, and click Next until you can Submit changes.