Sounds like my child at 6 years old, seriously bright, funny, adorable - would also scream for hours at any kind of transition or at being told no. And I mean hours. There was one particular low point where police turned up on our doorstop for a welfare check because the screaming that day had been so loud and persistent. I think he hadn't been allowed on his Switch that day.
Lots of advice was given about him being a spoilt brat and being far more stern with him and shutting it down, and not feeding him if he refused his dinner and taking all his toys away and basically punishing him until he gave in, yada yada yada. Somehow I knew instinctively that wasn't the right way to go. Plus it had no actual effect when I tried it anyway. He also masked beautifully at school, although it had started slipping.
After a hideously long wait for an assessment after going to the GP because I could see that he wasn't actually defiant or spoilt, there was a very scared and out of control little boy in there and sometimes after a particularly hideous melt down, he would be inconsolable and it would break my heart.
Turns out he has ADHD without the hyperactivity bit so, ADD, but with the hyperfocus, and on the spectrum but not enough for to be the primary diagnosis.
Most of the advice given here wouldn't have had helped. Well, that's not quite accurate, it would have, in fact, escalated the behaviour even further.
There are other ways to de-escalate the tantrums and meltdowns.
Girls tend to mask even better than boys. You know your child, but if you have even the slightest niggle at the back of your mind that something else might be going on, then it is worth investigating. It's quite unusual to scream for hours and all behaviour is communication. She's telling you something. I would try and listen.