Here's a real hard case. A one-year-old kid in Britain has congenital myasthenic syndrome and is on life support. He can apparently hear, see, and feel but has no control over any muscles, including those needed to breathe, eat, or grasp toys. He is deteriorating. He breathes through a tube up his nose. Parents are described as amicably separated. The mother wants to pull the plug. The father does not and is willing to continue care for the kid at his home.
So who gets to decide? In this case, the court decides who decides. A "senior paediatrician" testifying in the court case described at the link said he was on the mother's side, because "'it's the mother that I put particular weight on her views. If a mother expresses a view to me in my ordinary clinical practice, that's something I take very, very seriously indeed."
So it's not whether the parent is custodial, or has been involved in the kid's life, or the parent's resources, or the willingness of the other parent to take over care of the child. It's you take the mom's side because she's the mom. What a crappy way to settle such a difficult question.