What I usually tell students is that homework and projects are learning opportunities. The point isn’t for them to produce a particular artifact; it’s to go through the process and develop skills along the way. For instance, I do not need a program that can sort numbers… I can do that myself and there are a gazillion instances of that. However, students should do that assignment to practice learning how to code, how to debug, how to think through problems, and much more. The point isn’t the sorting program… it’s the process and experience.
How do you get better at say gymnastics? You do a bunch of exercises and skills, over and over.
How do you get better at say playing the guitar? You play a lot songs, over and over.
How do you get better at say writing? You write a lot, some good, some bad, over and over.
To get better at anything, you need to do the thing, a lot. You need to build intuition and muscle memory. Taking shortcuts prevents that and in the long run, hurts your learning and growth.
So viewing homeworks as just about the artifact you submit is missing the point and short-sighted. Cheating, whether using AI or not, is preventing yourself from learning and developing mastery and understanding.