It would seem that what was put into the report is clearly wrong (in this case from generative AI, but regardless of where it came from, it would still be wrong), so it is still legitimate to mark those parts as wrong. There are other things too which can be called wrong, whether or not the use of this generative AI is permitted (and it probably makes sense to not permit it in the way that it was used in this instance), so there are many reasons why it should be marked wrong.
However, if the punishment is excessively severe, then the punishment would be wrong.
He didn't get detention for hallucinating facts. He got detention for plagiarizing hallucinations without attribution.