Who's watching the kids?
If the parents aren't, then the perverts are.
Parents have to be hypervigilant about what their children are doing, beginning in middle school. Cell phones can be wonderful devices, but they are also the gateways to your child's soul, and plenty of monsters have figured out how to access that gateway.
Parents have to get over any scruples they may have about "butting" into their children's lives when it comes to knowing what's going on with the smartphone. Parents should always have the password to the phone, and should periodically check (on an unannounced basis) - if the password has been changed, the phone gets set back to factory original and/or confiscated and all data is wiped. Parents should also be very careful of so-called "appropriate" setups - if something untoward is going on, the child will frequently have been told how to set up hidden apps so that a quick examination of the phone would not reveal what they are actually up to. If a parent has any sort of a reasonable suspicion that something is going on - e.g., the sorts of mood and personality changes referred to in the article - take the phone to a forensic examiner who can tell you exactly what is on the phone. It will be pricey - $600 or so, depending on where you are - but you will get everything that is on the phone, whether hidden or not, including transcripts of chats.
If you find something pornographic or abusive, take it to the police. However, be prepared for the police to dismiss your concerns, either because all the parties involved are "kids" just doing what "kids" do these days, or because they are not familiar with the sorts of grooming techniques abusers and monsters use, particularly in the gender disphoria space. Be prepared to have to educate the cops on this stuff.
Also, in appropriate circumstances, be prepared to have to challenge other parents because, dollars to donuts, if your child is having these sorts of problems, other kids in her school or community will be involved, either as abusers, or as grooming tools. And be prepared for these other parents to be in complete denial, and to get extremely angry at you and try to force others to ostracize you.
And keep in mind that many of the people who engage in this sort of grooming and abuse are sociopaths/psychopaths, and that a child of 13 who engages in this sort of activity is likely to be a budding sociopath or psychopath.
Finally, as the article is at pains to point out, remember that this is your child whom you love, and whom you are trying to save, and don't see her (or him) as a monster to fight with. Persistance and love will ultimately win out in most cases.
I have a family member who went through something sort of like this with their child - it wasn't gender dysphoria, but bdsm-type sexual grooming by another boy, who was only 12 at the time. The police dismissed the parents' concerns, but they were able to get their son out of the mess he was slowly being dragged into - the 12 y.o. was trying to groom the son into bdsm type sexual relations, and even had one text message that said more or less "we're under 13, so we won't get in trouble with the cops." That 12 y.o. is now a young adult, and I understand that he is already facing more serious allegations of potential rape. He was a budding psychopath at 12, and he is now apparently fulfilling that "promise". The family member's son is, however, no longer on the downward path.