So do you mean that the sentence" Do you have anything in mind what you'd like to have for dinner?" is not correct in grammar or not usually said?
This is an exercise, and the answer given is "what". I have to explain it to my students.
That sentence is
not correct. The answer is wrong.
You
could say:
"Do you have anything in mind
about what you'd like to have for dinner?"
"Do you have anything in mind
concerning what you'd like to have for dinner?"
The grammar is different in these sentences. In the original, 'that' is a relative pronoun, referring to 'anything' - "Do you have in mind
anything that you'd like for dinner?"
In the above two sentences "what" means "that which" - "Do you have anything in mind about that which you'd like for dinner?"
Here, 'which' is the relative pronoun, referring to 'that'. But this is not a common usage, especially colloquially.
Here is a better example:
"
That which doesn't destroy you makes you stronger" = "Whatever doesn't destroy you makes you stronger."