Here function output is defining the sorting of the shipping methods, but that is NOT what happens on the checkout. Local delivery seems to have a mind of it's own and sometimes appears randomly as the last shipping method, which is not what the sorting function specified. Is this known behaviour or issue?
Function Stdin:

Function Stdout:

Checkout:

Store name:
https://sylab-store.myshopify.com/