“We asked the Messenger of Allah (ﷺ) about the fetus. He said: ‘Eat it if you wish, for it is considered legally slaughtered with the slaughtering of its mother.’”
Sunan Ibn Majah Book 27, Hadith 38