Shaykh Yasir Qadhi answers the pertinent question - is minute quantities of alcohol permitted in one’s food?
The basic rule for this with reference to the Hadith is that applies is that which intoxicates in large quantities is Haram in small quantities.
Not every alcohol is Khamar and vice versa is also true. Vanilla extract has a lot of ethanol in it but it serves only as a solvent. So even if we eat food that has lots of vanilla incorporated into it, it does not become Haram and does not intoxicate us.