Anecdotally my experience with generative AI is that the valid output space is very tiny especially under a restrictive prompt, i.e. homework question, even smaller when the output also has to be a correct answer. Using a riskier decoding scheme only generates output that is paraphrastic to each other. So lexical similarity should catch most of the naive prompter.
Subjectively, if a student can knowledge-guide an LLM to generate response from a specific perspective, I think it is very debatable whether such usecase should be outright punished.