Biologically this means that the infant would release the mother so that they could have another child, so there is biological adaption on most species to not drink milk past a certain age.
And we have it too via lactose intolerance, which is normal.
However, some relatively small percentage of humans developed the ability to drink milk around 10k years ago in Turkey, but it's not perfect. It gets worse with age as one would expect.
Human babies shouldn't drink cow's milk, it's completely unnecessary and there are questions about it's effect on long-term human health.