Answered by Shaykh Ilyas Patel
Would it be permissible to eat food cooked with alchohol or cakes which have alcohol in them considering the following: (a) it is not used as an intoxicant; (b) it is not used as intoxicants as used (i.e. for alcoholic consumption, even a little); (c) it is not used in an amount that intoxicates; (d) it is not used in vain (lahw).
In the name of Allah Most Compassionate Merciful
I hope you are fine and in the best of health and iman.
Foods prepared with alcohol are haram to consume, though it evaporates as it is believed, but it is part of the ingredients and will not have any affect on its outcome.
Below is web link, showing a research conducted by the US Department of Agriculture’s Nutrient Data Laboratory that alcohol does retain in any type of cooking method, though the conventional wisdom in the food world is that alcohol evaporates and dissipates:
And Allah alone knows best