The hard part is that assessments are designed to test students' comprehension of the course material. If they get ChatGPT to write it, they may not be directly plagiarising another human's work, but it's also not their own work.