Module Builder Subpanel Sort Order

I am able to set the sort_by key using the module builder $layout_defs array but it gets overwritten when the module is deployed, how do I avoid this? (and no, avoiding redeployment is not an option …)