Japanese often omits the subject.
Because It is obvious that you are talking about yourself, but If it is not obvious, we will not omits it.
The same is true of "好きな" and "食べ物".
Quesion is "how about with favourite things?" t is obvious that you are talking about your favourite things.
and, Chocolate is food.You know.
So, More natural answer is "チョコーレトです".
but if It is not obvious that you talking about yourself, we will not omits it. so We often say "私はチョコレートです".
It's really odd, isn’t it? What?Are you Chocolate !?
This is not good Japanese ... but It happens in Japanese.
so If you want to answer with natural Japanese,
・私の好きな食べ物はチョコレートです。 ( correct )
・好きな食べ物はチョコレートです or チョコレートが好きです。 ( natural )
・チョコレートです ( more natural )