Coconut oil is very stable, the antifungal properties, derived from the medium chain fatty acids, will still be beneficial, even when the oil is used for cooking.
Of course the fact that the food tastes better, and that coconut oil has lower calories than other fats, is an added bonus.