we have this issue while creating scratch org with bash script. I am mentioning the command below
echo "Deploy the new zip including the flow, ignoring warnings, then clean-up."
sfdx force:mdapi:deploy -g -f experience-bundle-package/"$communityExperienceBundleName"ToDeploy.zip --wait -1 --verbose --singlepackage
rm -fr experience-bundle-package --json