Hacking the Git Shell Prompt
blog.plover.com
blog.plover.com
[1]: https://starship.rs/
One workaround they've used is to use a shorter branch name locally which tracks the longer remote branch name.
This blogpost shows details about looking into abbreviating the branch name in the shell code for the git part of the prompt. The author found a way to do it by making use of a particular colorising hook.