There is supposedly neanderthal DNA in some modern humans, implying that offspring were viable. Breeding resulting in viable offspring is one of the only consistent definitions of what a species even is.
It's really unfortunate that schools tend to simplify the definition of species in this way, because it's just not really not meaningfully true at all. We could "make" it true by actually defining species this way (at least for animals) but it'd radically transform our taxonomies.