Honestly shocked that the Attorney General is apparently ignorant about safeguarding law being breached every day in schools..... it's all politics, not law.
The AG is basing this on the Equality Act. That because Gender Reassignment is a protect characteristic that can be applied to those saying they intent to transition, it would therefore be a breach of their protected characteristic not to allow them to self identify. (At least this is what I understood is being said to be the reason.)
Being a trained lawyer I suspect she has only looked at it inthe very narrow way, eg is it discriminatory to stop children self identifying. It would need the children's minister to ask her an equally narrow question, ie do adults in supporting children self affirming breach safeguarding guidelines?