In attachement, please find a Git repository to reproduce the issue. It has two branches, create a pull request to merge new-branch into main, this will show the issue.
There are two branches with three commits each :
-
main
- initial commit
- a common change
- a change on main only
-
new-branch
- initial commit
- a common change
- a new branch change
The only diverging commits are a change on main only and a new branch change. When creating a pull request to merge new-branch into main, it appears that the change section shows a diff of a new branch change against a common change instead of a new branch change against a change on main only.
Hence, we get something that looks like:

While we are expecting something that should look like:
