I cannot imagine a detection mechanism that could not itself be defeated by some tweaks to the prompts being used to generate the essays.
It's effectively the same problem as "prove that this kid didn't get their friend/cousin to write the essay for them".
Using AI to write will cause the same issues as:
- phones, some people don't try to remember directions, phone number or addresses
- calculators, some people cannot do easy math
- computers, some people cannot write with a pen, cannot spell without spellcheck
Cheaters gonna cheat, no matter what. This will at least get the group back to pre-conversational AI standards.
The highest-quality answer involves skilled teachers with enough time who know and understand their students. (Actually the very highest might involve personal tutors but let's leave that aside.)
Going down a few steps you might combine the automated approach with skilled teachers and maybe add human editors who can do support work asynchronously?
Watching my son try it, he spends more time reading the created essay and correcting mistakes in it than he does writing one himself. The checking process is very similar to marking, and I think it's possible he's learning more this way.
(Also, he's madly trying to automate fact checking which is doing no harm to his programming at all!)