So sorry to read of this problem. As said earlier, it is unfortunately common with girls in this age group. I am glad your DS and DIL have alerted the teacher as they and teaching assistant can be sensitive and help to build DGD's sense of self-esteem which must be bruised at
present.
As a primary school teacher, I have to teach what constitutes 'bullying'. Sometimes children use this word when they mean they feel left out. It is tricky - we say any sustained /deliberately repeated behaviour that aims to isolate / exclude etc. is bullying. But sometimes in friendship circles it just does happen that children fall in and out of 'like' and can be very influenced by others, without meaning to be unkind.
I hope the teacher has looked into this as if bullying really is taking place , the school needs to respond with pastoral care and addressing the problem directly with all concerned.
Good teacher advice, not to chase the friendships, but so easier said than done.
Is there anyone else in the class that DIL could invite home to tea for your daughter to help make new friendships?
Glad she has a wide and loving circle of family and friends - ultimately, she will come through this and if she can be reassured that it is not because she is 'the problem', she will hopefully learn positives.