Covid 19 and " Remote" or " Distance " learning has increased the number of academic integrity and student misconduct cases across the last two years.
Some of this phenomenon can be attributed to violations of school policies concerning covid safety for student parties and groups but there is no question that academic integrity cases are up as well.
This may stem from the temptation to work in conjunction with one's classmates when professors can't see the exam being taken but unfortunately this has led to an outbreak of professors using computer programs to look for exam " similarities" which are then the foundation of academic integrity complaints.
This scrutiny has extended to so-called homework websites like Chegg, Tutor.com and Homework Helper, and quite a number of students have been caught for having referred to these websites during exams. If your exam answer is at all similar to content there, don't be surprised if your college or university drops an acadmic misconduct or integrity case on you.
So the obvious answer is don't work with a classmate unless that is permissible and don't use any materials that are forbidden by the exam instructions. There are however occasions where students are accused of cheating, plagiarism and misconduct, when they have done nothing whatsoever. Correct exam answers are going to look quite similar which inevitably leads to the use of similar language or equations.
What does one then do in response to an accusation, valid or invalid? The answer is speak to an attorney experienced in such cases before you disclose anything to your school and its acadmic integrity machinery. Despite your quaint notion that it's "your" school, the student misconduct offices are notably devoid of any loyalty to the accused students.
The famous box of kleenex in the University of Maryland Collge Park's Office of Student Conduct was a historic symbol of that office's presumed guilty attitude.
Lawyers who have done this work can increase your prospects for a better outcome by helping you use the "investigation" to level the playing field and force the school to actually specifically disclose what the accusation is and what evidence exists that support the claim.
Historically, highly generalized claims of acadmic misconduct are made and largely unchallenged until the actual hearing at which time the schools empanel boards of people highly predisposed to convict their fellow students and deny any appeals from these convictions.
It is a measure of the fairness of the systems and people in place that words like "accused" or "convictions" are despised by the schools despite their obvious applicability.
The bottom line, your university or college is not your friendly benefactor. They are large businesses and bureaucracies and often find it more efficient to dispose of your student misconduct or academic integrity cases without providing you a fair opportunity to exam and dispute the underlying evidence and assumptions. Don't let them.