I’m not 100% certain because I almost always prefer leaving comments and letting the author address the problem rather than pushing to the PR myself, but I believe it chooses the PR author as the primary author of the commit, and then the committer who pushed an additional change is added to the “Co-authored-by”. The same thing happens if the PR author directly applies a suggestion using the GitHub UI. So, I don’t think the “Patch by” or “Co-authored-by” is necessary to attribute the PR author as the author of the commit.
If the committer did not push a commit to the PR and only merged it, I’m certain that GitHub chooses the PR author as the sole author of the commit (assuming the author did not directly commit any suggestions in the GitHub UI or make direct changes to the “Co-authored-by” for any commits to the PR). For a recent example, see GH-20153 and its respective commit. So, the “Patch by” or “Co-authored-by” is not necessary in that case, as far as I’m aware.
On a related note regarding “Co-authored-by”, I’ve personally been unaware of how to best utilize it in the PRs of others. For my own, I typically try to use it for any review comments that result in a direct change. Is it generally acceptable to make manual “Co-authored-by” entries in the final merged commit message in someone else’s PR when merging it if the author forgot to attribute others that significantly contributed?