As of Winter '19, you can specify the setting
ApexApprovalLockUnlock from the Metadata API's
OrgPreferenceSettings entity as part of your scratch org configuration file. (Deploying settings entities with the Metadata API continues to work).
"settings" key, you nest your settings entities and translate their names into
In Winter ’19 and later, scratch org settings are the format for defining org preferences in the scratch org definition. Because you can use all Metadata API settings, they are the most comprehensive way to configure a scratch org. If a setting is supported in Metadata API, it’s supported in scratch orgs.
Although the Settings are upper camel case in the Metadata API Developer Guide, be sure to indicate them as lower camel case in the scratch org definition.
When converting existing org prefs to settings, the org prefs that start with “Is” have a corresponding setting that starts with “enable”. For example, “IsOrdersEnabled” is “enableOrders” that takes a Boolean value of true or false.
Here, you can do this in your scratch org config file:
Then your scratch orgs will spin up with the setting already enabled: