“The law still prohibits fake child porn and prosecutes it as such.”
What law? The Supreme Court has already ruled otherwise:
https://www.rcfp.org/supreme-court-strikes-down-portions-virtual-child-porn-law/
That's a two part ruling. The first part addressed actors of legal age who look like minors. This was brought about with the proliferation of "barely legal" porn that became popular in the late 90s. Youthful-looking but legally adult actresses dressing like schoolgirls in porn films got a lot of people hemmed up in legal trouble. Today, now perfectly legal and commonplace.
The second part is a little hazy. AI-generated child porn could be legal UNLESS it looks like an actual minor, in which case it's a violation of federal law. So, if someone's AI-generated child porn just happens to look like my daughter, even if they've never seen my daughter, they're potentially in trouble.
The student offenders in this story most certainly ran afoul of federal law seeing how they used easily identifiable photographs of their fellow students.
Citizen's Guide To U.S. Federal Law On Child Pornography (U.S. Department of Justice Website)