Assign homework that, if one actually does the work themselves, will help them hone the skills they'll need for the in-class assessment.
Then allow students who want their homework evaluated for feedback to turn it in, but no homework will be graded.
This relegates the use of AI to personal choice of learning style and any misuse of AI is only hurting the student.