How can I force a deployment to wait in Octopus Deploy until another deployment finishes?

Octopus is configured to deploy 5, 10, 15, 40 projects to the same set of deployment targets. When deploying than one project the message Waiting for the script in task [TASK ID] to finish as this script requires that no other Octopus scripts are executing on this target at the same time will appear multiple times.

How can we tell one deployment to wait until another deployment finishes?

This answer has been migrated over to: https://stackoverflow.com/questions/60303864/how-to-tell-octopus-deploy-to-wait-until-another-deployment-finishes-on-the-same/60303865#60303865