This isn't what attachment theory says. Attachment is not created by pregnancy alone. It develops through ongoing caring/bonding after birth.A child removed from from it's birth mother via surrogacy suffers the same profound damaging loss as a child removed for adoption. This is the same if the mother has no biological link to the child as they have had 9 months of attachment.
The mother is all that baby has known and the removal leaves a permanent mark on that child.
That is enough for me to think it should be banned but also women aren't rent a wombs. It leads to a trade in poor women who risk their health to give birth for payment. Giving birth is often the closest a woman comes to death and it has a serious impact on her body. I have lasting damage from birth injuries and I have several friends who nearly died.
A newborn may recognise and respond to the person who carried them, but that is not the same as having an established attachment relationship.
Even in adoption, researchers do not generally argue that every newborn adopted at birth has suffered attachment trauma because they were separated from the birth mother. The concerns raised by adoptees are often broader and relate to identity, secrecy, stigma, or later separation from established attachment figures, not evidence that gestational separation alone causes attachment injury.
If separation from a gestational carrier inherently caused attachment trauma, we would expect to see widespread evidence of psychological harm among children born through surrogacy. Decades of research have not shown that.