Well, in traditional English, your teacher possibly has the reason, because for instance, in French, such kind of questions would only allow the usage of "which":
Which is your favourite food? = Quel est ta/votre nourriture favorite/préférée?
In the above example, the corresponding French interrogative adverb, "que", would not well fit into the context.
However, as respondent Peachey stated, when there is a choice of selections, then the interrogative adverb "which" is required, while if the question poser only cares about a particular answer, then the interrogative adverb "what" is preferred. Additionally, respondent Learner has provided a number of good examples for references.
Take care, and good weekend. / 祝 週末愉快。