Depending on your project-level New Code Period settings, your first analysis of a new branch will likely always pass the Quality Gate. Your first analysis is acting as a baseline - compare all new analyses to this. You expected all the code added/updated since the branch point to be automatically detected as “new” but for that you’d need to set the reference branch.
Probably want you want to consider is taking the setting applied at project level and apply it specifically to the main branch. Then I believe you can set the project-level New Code Period to using the main branch as a reference.
As to why the QG correctly failed for the PR, it works differently there. For PRs the New Code Period is automatically set to changes since the branch point.