Workflow must be locked if deploying to TestFlight

Does anyone know what this message means?

"Workflow must be locked if deploying to TestFlight."

I'm trying to save changes on a workflow that I've edited before but can no longer save.

I'm in the same boat, though I'm setting up TestFlight deployment for a new product and getting this error.

In Xcode go to Product -> Xcode Cloud -> Manage Workflows. Select General in the top left and find the checkbox "Restrict editing". This checkbox has to be selected to make TestFlight distribution possible.