Steer clear of the most classic programming problems, don't use problems considering widely known concepts (like prime numbers) but rather define your own concepts that are not as widelybused. Look for/design questions that require the student to recognize edge or special cases and handling them. Combination of these seems to usually throw ChatGPT off