I honestly do not know how a school can stop/catch students from using ChatGPT(or something like it). The only way is to have students write essays in a room with a moderator making sure they are not using AI.