In the metadata/subpaneldefs.php you have an array with the subpanel definitions. This array has a ‘order’ that you can check and change to the desired order…
You can change this in a custom file ( custom/modules/<desired_module>/metadata/subpaneldefs.php
or via the Extension framework: drop a file in custom/Extension/modules/<desired_module>/Ext/Layoutdefs/
with some content like:
$layout_defs[<desired_module>]['subpanel_setup'][<subpanel_name>]['order'] = <some_number>
Then, do a QR&R and you should have the subpanels in desired order…