This is a common misconception, but no it likely wouldn’t be considered a breach of GDPR. The purpose of the processing is because they broke the rules of the community. GDPR doesn’t prevent site owners from investigating such incidents.
If they break the terms of the community or break laws you have every right to investigate.