Very simply put, the way medications are passed on to the baby during pregnancy and during lactation differ.  The gestational age and doseage during pregnancy is taken into consideration.  The infants age and doseage is considered during lactation.  At one point, your baby may be old enough to handle a certain medication taken at a certain doseage and for a period of time.  However, the same medication, duration and dose would not be safe as it crosses the placenta and affects the baby more actively in utero.