Rebasing a long branch that has other local branches pointing at intermediate commits used to leave those branches behind on the old, now-orphaned commits, forcing a manual 'git branch -f' for each. Git 2.38 (October 2022) added 'git rebase --update-refs', which detects refs pointing at commits in the range being replayed and moves them to the corresponding new commits automatically. In an interactive rebase the todo list gains explicit 'update-ref refs/heads/name' lines that you can reorder or delete.
Enable it permanently with 'git config --global rebase.updateRefs true'. Confirm it worked by running 'git log --oneline --decorate' after the rebase and checking that the stacked branch names appear on the new commits rather than trailing behind.
One caveat for stacked-PR workflows: --update-refs only moves local branches. The remote-tracking refs are untouched, so each moved branch still needs its own force push, and each of those pushes wants --force-with-lease --force-if-includes.