We examined fetal head turns to visually presented upright and inverted face-like stimuli. Here we show that the fetus in the third trimester of pregnancy is more likely to engage with upright configural stimuli when contrasted to inverted visual stimuli, in a manner similar to results with newborn participants. The current study suggests that postnatal experience is not required for this preference.
It goes even back for certain visual stimuli
https://www.cell.com/current-biology/fulltext/S0960-9822(17)30580-8#secsectitle0015