We've noticed issues with
https://github.com/cloudposse/github-action-pre-commit creating problems with branches where it updates the current branch with main, but the commits are included in a new commit which makes the PR look like it has all of the other changes as well.
Maybe this is an issue caused from squash committing or something else...not sure, but only formatting/committing changes from the current branch without updating it would be ideal.