Scratch org. default workflow user
For your Scratch Orgs, you can use the DefaultWorkflowUser
feature in your project-scratch-def.json
file to set the value with the scratch org user:
...
"features": ["DefaultWorkflowUser"],
...
The feature value is documented here, even though it's not explicitly explained what it's doing.
Unfortunately, as of the time of this answer, there is no public API that allows you to set this value. You would necessarily need to change it manually each time.