Error on Publish Quality Gate Result in Azure DevOps Release pipeline

In my particular case I have to run the sonar analysis in the release, I can’t do it in the pipeline because it depends on the environment.
I have been using sonar in azure devops for several years but always running sonar from the pipeline
In this very special case I have to run the sonar in the release and this is where the error occurs.

Error in: Publish Quality Gate Result:
##[error]The “path” argument must be of type string. Received type undefined

Run Code Analysis: no Warning and no error:

if i run it manually on my pc it works fine:

sonar-scanner.bat -D"sonar.projectKey=SQLAA" -D"sonar.sources=Develop" -D"" -D"sonar.login=nnnnnnnnnnnn" -D"sonar.sql.dialect=tsql" -D"sonar.language=sql" -D"sonar.exclusions=DefinitionName/**" -D"sonar.scm.disabled=true" -D"sonar.verbose=true"

I use standalone scanner

is a simple release: