Different coverage values for identical branches


We are using SonarQube 8.5.1 Developer Edition and we’ve configured our branch analyse to be done against master branch.
For each new feature that we implement we are creating a feature branch. From a feature branch we are creating subbranches for every task:

  • feature-1
    ** task-11
    ** task-12
  • feature-2
    ** task-21
    ** task-22

We are constantly rebasing our features branch with master, to get the latest changes that were released.

Recently quality gate started to fail for feature-1 branch. The branch was created 2 weeks ago, the quality gate was passing. After merging task-12 (for which the quality gate was passing) quality gate started to fail for feature-1 branch, it complains about the coverage, it is 73%, less than 80%.
I’ve created a new branch, feature-1-copy, which has the same content as feature-1 and the quality gate is passing for it (coverage is 81).

By comparing the analyse result for feature-1 with feature-1-copy I noticed that new lines to cover have different values: 396 for feature-1 and 687 for feature-1-copy.

Both branches are compared to master branch. Why sonar does not spot the same changes in both branches since they are identical and compared to master?

Thank you,