OP, we had some of this with DD around that age-not all the time but now as a teenager we still have outbursts where she is unpleasant and irrational and nothing seems to work. I think there is definitely a hormonal element- I looked into it when she was younger and found some literature about surges of hormones in 8/9 year olds. Ours is beautifully behaved at school and with others: nobody outside the family would believe it and sometimes it is over nothing, or at least from our perspective it seems like an enormous overreaction.
We have tried everything and nothing completely fixes it but I have tried to reframe it to seeing it like a toddler tantrum. She gets to a point of frustration and blows. We now stay very calm and don't really discuss it in the moment. She can't respond rationally so there's no point trying to talk about it right then. If she says something particularly outrageous, like calling me an idiot, I would say we don't talk about anyone like that and remove myself from the room. These days she often storms off and we leave her to it.
We have tried consequences but without success and I think rather than being deliberately unkind, she is just really struggling to manage her emotions and is always distraught afterwards. We have tried to get her to do some things to stop herself from getting out of control like the decider skills (worth a google) but without any success.
So we are just giving her some space in the moment. Luckily she is only ever like this at home. I think she puts plenty of energy into not being like this anywhere else and runs out where she feels safest.
The most useful thing DH and I have done is to support each other not to get cross/upset ourselves. It just exacerbates the situation. Currently we can go a month without it happening and she is fabulous in the interim and then we might have a few instances. She isn't a stressed or anxious person at all and takes most things in her stride but excessive tiredness can make things worse.
Her school were running a workshop on supporting teenage mental health that I did and that was good in reframing her behaviour as communication rather than actively being unpleasant which certainly rang true and made me feel better.
Lots of people will tell you to 'not allow it' and that their child would never be 'allowed' to speak to them like that or there would be Serious Consequences but limiting the emotional outbursts by not having one myself is the only thing we've seen any success with. If she could regulate in the moment she would. No consequence helps her to do that or prevents her from being like that in the future.
I am careful not to ask her a load of questions straight after school as that could be a flash point-she is better if she can come in, eat something and decompress and will then be very pleasant. I also don't ask her to do stuff I need her to do then either. I am aware I am very much managing her behaviour rather than changing it but I think that's as good as I'll get. The goal for me is to limit the frequency of times where she feels out of control and the duration. It is easier because it is always at home. Now she is 14 I can go to the shop, come back and she's out of the other side if my calmness is ebbing away.