I see two different but related issues:
- perfectionism
- wanting to be the top student, relative to others

If it helps to know your daughter is not alone in this, these are frequent topics on the forums. For example, here is a link to one old thread.

Taking "above level" tests in which a child's knowledge base and reasoning are measured in depth is one example of a positive experience in which a child:
- does not score 100%,
- may be compared with an intellectually advanced peer group amongst which the child will not be the top scorer.

To develop flexible thinking and good sportsmanship, be well-rounded and a lifelong learner, it often helps to think in terms of one's "personal best".

If a person begins to avoid activities at which they cannot immediately excel or be "the best", you may be interested in exploring the book mindset by Carol Dweck.

Perfectionistic tendencies may be a sign of developing a fixed mindset rather than a growth mindset. One aspect or application is that gifted kids may stop taking appropriate risks in order to always be "right" or always be "smart" or never be "wrong", and this may work against them. The concept is nicely summarized in these youtube videos:
Ashley Merryman & Po Bronson: The Myth of Praise (link-
)
Teaching a Growth Mindset (link-
)

Parents may wish to read the book Mindset by Carol Dweck for tips on promoting a growth mindset. It is based on years of research. Not that I agree with every idea/application, but on balance found a number of ideas to be useful.