@girish The script you gave as an example doesn't exist. Maybe you forgot to deploy it on the production release? Here is a working one-liner to enable it. Remove --subdomains from the end to create a subdirectory install (that's the default so you just have to remove the flag).
cd ../data/public && sudo -E -u www-data /app/pkg/wp core multisite-convert --subdomains