35 years ago my BIL fathered a child with a casual acquaintance. They worked together but did not live together and were not in a committed relationship. Before the baby was born the mother moved two hours away to be close to her parents and did not consider how BIL would feel about that. He also did not drive at that time (he was 21, she was 19).
At the beginning, he had limited contact, always with the mother 'supervising'. He persevered with the little contact he was granted and made sure he could be available to any contact she offered, even if it was a little inconvenient for him and his work responsibilities. It went on like that for a few years. BIL's parents only saw their granddaughter when BIL started to be trusted to take his daughter out for the day without the mother being there.
Eventually, the mother understood that letting BIL take his daughter for the weekend including overnight or days out in the week actually helped her out with having some 'me' time so she became far more amenable to his support and help with raising their daughter separately. While his contact/bonding with his daughter was fractured at the beginning, it all started to become far better as time went on and emotions were not so high. BIL has said it wasn't easy in the beginning, but he persevered and never let the contact lapse, even though at times he nearly felt like giving up.
While the whole experience isn't what most co-parenting people want, it has not had a detrimental effect on BIL's daughter. In her early years, she had two homes, two holidays a year, two family gatherings and when both her mother and father married other people, she eventually became a big sister to several half brothers and sisters. She is now 35 years old and still has a great relationship with both parents and their 'separate' families and, of course, the grandparents did manage to be a big part of her life - sadly some of them no longer alive.
It can work well, but it takes time and consideration for all the parties involved. At the end of the day, it must be in the best interests of the child involved.