Sort modules in config.php alphabetically?

Is it possible to sort the output of the modules node in config.php alphabetically? This way git versioning won’t get messed up since Magento sometimes changes the sorting.

<?php
return [
    'modules' => [
        'Magento_ModuleA' => 1,
        'Magento_ModuleB' => 1,
        'Magento_ModuleC' => 1,
        ...

composer.json has an option for it, is there something similar for config.php?

 "config": {
        "sort-packages": true