There was a time when I had to advise queer clients that if we went to court over custody or access issues, we would almost certainly lose.
Happily, that is no longer the case. Queer families are very much more 'taken for granted' in the law and in the legal system, and courts decide who is going to be the primary parent of a child when their parents separate in the same ways that they would if the parents were heterosexual.