That’s not fully correct. Beagles and irish setters are known to have difficulty in producing viable offspring. This would be the result of incompatable genetic abnormalities. This might be a factor in infertile mating between what we consider to be different species. This is in contrast with coyotes and wolves which are known to produce pups although considered separate species. They rarely mate when nonstressed in natural conditions, but may bear more similarities with one another than domesticated dogs do with their African wild dog cousins(?).
This may be of interest: