It seems that according to the Nehar Shalom Orach Chaim 318,1 all the Acharonim in Yore Dea 99,5 agree that it would be forbidden for one's children to benefit from an Issur Deoraisa transgression by their father, which would include cooking on shabbos. This is explicitly stated in the Magein Avraham Orach Chaim 538,6:
ואם עשה דבר שאינו אבד בח"ה אפי' לבנו קנסו רבנן (נ"י) ומאבדין אותה ממנו ודוקא למ"ד מלאכת ח"ה דאוריי' (רי"ו) ונ"ל דדמי לעושה מלאכה בשבת שאסו' לו לעולם וה"ה לבנו
However the Shach Yore Dea 99,6 12 says: If the food was cooked via an Issur Deoraisa for example Bittul lechatchila (on purposely mixing less than a 60th of Treif food with Kosher food so that its nullified), one can sell the food to a Gentile or a Jew who pays no more than what a gentile will pay. The Pri Megadim explains that since the price the gentile will pay is the same whether there is treif food or Kosher food, the Jew has not gained from his sin (he could have sold the Treif food separately from the kosher food to the Gentile without mixing them both, for the same price):
אסורים למכרו לישראל.לי נראה דדוקא כשהישראל לוקח ביוקר מהעובדי כוכבים אסור דאי לאו הכי אין טעם לאסרו למכור לישראל דהא לא אהני מעשיו הרעים
So we can deduce that if one sells the food he cooked on Shabbos for the cheaper price of the raw ingredients rather than the expensive price of the cooked product, since he has not gained from his Transgression of cooking on Shabbos, this is permitted.