If you squash your PR before merging, then this alternative worked really well for me:
git fetch --prune && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D