There’s also an instruction in the text shown to you when you create a PR that has a link to a community thread on how to do it:
ATTENTION: Don’t use “git merge” when working with your pull request branch!
This can clutter your Git history and make your PR unusable.
Use “git rebase” instead. See this forum post for further details:
Rebase your code! Or: how to fix your git history before requesting a pull