Analysis on PR's goes green after merge to master is red. Is this a bad configuration or what?

We are using Azure DevOps Services for our projects. Our code is written in C#.
Our Sonar Cloud projects are connected to CI builds, on Pull Requests. Generally looks ok, but we see some strange for us behaviors. Build on PR is green, with SonarCloud analyses also. The last master branch analysis is also green. After merge master is red with SonarCloud issues. Are we have the wrong configuration? Maybe we can tune some configuration? New Code we have selected as “Previous version”.
Could you explain to me what is wrong or how Sonar Cloud works?
Thanks for your help and comments

Hey there.

What specific Quality Gate conditions are failing after the merge?

Code smells, and Security Review


  • Can you give an example of some of the code smells that were raised in master that weren’t raised in your PR, that are now failing your QG?
  • Just to make sure I understand – you reviewed Security Hotspots that were raised by your PR, and the review status wasn’t carried over to your branch after the merge. Is that right?

There were no code smells and Security issues. We have set quality gates for 0 new code smells.

On PR there were no Security issues but after the merge we see

Okay. Can you take a screenshot of the Pull Request dashboard for the pull request that is now merged?

Thanks. Does the Code tab accurately reflect the changes made in the pull request, or is it missing something?

Only those changes went into the master branch. After merging, the build went to master and we got these results that I posted earlier