How to sort shipping rates that are returned from app

Lets say we have a Shopify App that returns custom rates at the checkout and each of them has a sort_order property. How could this be used to sort them to overrule the default sorting of Shopify?

I’ve gathered that https://shopify.dev/docs/api/functions/latest/delivery-customization is probably what I want and that deliveryGroups would be the specific part to work with but I haven’t been able yet to figure out how to access the sort_order property because there don’t seem to be any metadata properties that this is stored in and any queries for it directly fail. Is there any way to access the sort_order property or should I be looking at something else entirely?

[
    {
        "service_name": "Express Delivery",
        "description": "Next day delivery",
        "service_code": "EXP001", 
        "currency": "USD",
        "total_price": 2999,
        "phone_required": true,
        "sort_order": 3
    },
    {
        "service_name": "Standard Shipping",
        "description": "3-5 business days",
        "service_code": "STD002",
        "currency": "USD", 
        "total_price": 1499,
        "phone_required": true,
        "sort_order": 1
    },
    {
        "service_name": "Priority Mail",
        "description": "2-3 business days",
        "service_code": "PRI003",
        "currency": "USD",
        "total_price": 1999,
        "phone_required": true,
        "sort_order": 4
    },
    {
        "service_name": "Economy Shipping",
        "description": "5-7 business days", 
        "service_code": "ECO004",
        "currency": "USD",
        "total_price": 999,
        "phone_required": true,
        "sort_order": 2
    },
    {
        "service_name": "Same Day Delivery",
        "description": "Delivered within 24 hours",
        "service_code": "SDD005",
        "currency": "USD",
        "total_price": 3999,
        "phone_required": true,
        "sort_order": 5
    }
]

We already return them sorted from our API but since Shopify discards that sorting it’s lost when they are rendered. Based on https://shopify.dev/docs/api/functions/latest/delivery-customization I assumed we could sort them with move operations.

You can use this free app: https://apps.shopify.com/reorder-rates