I'm so sorry the school went back on their word after offering that your daughter could sit in the office until she was ready to go to class. It seems the situation called for a gentler approach and things got off to a rocky start?
Yes, very intense child. Does love to learn and loves to go really deep, but, if it is something she isn't that interested in, then, she gets the "I don't care" attitude. I saw this in homeschool, and the public school saw it too.
Might the common ground of what a parent experienced in homeschool and the public school saw in their academic setting as well, open a possibility for discussion, collaboration, and teamwork with a school? A child who is seen as only doing what they want to do in one setting and seen as strong-willed in another may be consistent in those behaviors, exhibiting them in a new school as well?
The behavior contract mentioned by mon sounds like a great idea. The book
A Parent's Guide to Gifted Children gives some helpful tips about successfully creating/enforcing behavioral contracts with gifted children. This book also walks parents through much of what HK described
... looking with unbiased eyes and love at the child we have.
Books tend not to give pat answers, but encourage parents to consider a broad and often challenging array of viewpoints and possibilities.
While books may not work for everyone, many families find them helpful in that the extensive examples provided may help a parent get out in front of a situation and recognize what may be occurring, rather than reacting/responding to a situation after the fact. Several parenting and advocacy books also offer thoughts as to what a family may wish to discuss proactively with a school in helping to assess "fit".
If there is childhood perfectionism or anxiety, there are books which show readers how to free themselves from thought patterns which may not be serving them well.
While insightful, these books are written gently for kids, in a style that is fun and engaging. Parents may wish to pre-read and decide if a resource may be a helpful tool for their child.
Others have mentioned possible grade acceleration, have you considered that?
Wishing you, your family, and your daughter all the best with this.
PS:
Does your daughter enjoy socializing with the other children from the theatre? Might friendships with her theatre friends help ease a school situation (arranging play dates, learning from friends' parents of other possible schools to consider, helping as an outlet if there is a return to homeschooling)?