Just add
extraProperties: | sonar.qualitygate.wait=true
in the inputs of your SonarQubePrepare task as stated here