Unable to Update Sonar-Scanner name

Trying to update ProjectName in begin script of SonarScaner for .Net Project.
Argument - /n:project name (no space)
SonarScanner version - 4.10.0

  1. Scenario - Take projectName from GitRepo - Everything is working fine.
  2. Scenario - Hardcoded Project Name as “InvalidProjectName”
    While debugging, I see it is taking project name in arguments.
    In the end, it is displaying a Quality gate passed check this URL.
    When taking that URL and open in the browser, it shows an error - the requested project does not exist.

image

Look like SonarScanner ignores this parameter except when analyzing the main branch of the project.
So when I ran the Main branch, it is working fine.