Are there cases / law that allows a woman to get impregnated contractually by a man and man not being responsible for anything?

Let's say she wants a baby, he doesn't want a baby nor marriage because whatever. He proposes that they can stay together and sign the contract that she is buying natural impregnation service and is absolving a man from any further financial claims. They keep living together or not.

Any countries that would support that?

https://www.progress.org.uk/sperm-donor-to-lesbian-couple-sued-for-child-support/