All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
The custody of a young child after the separation of the parents is for the mother unless there is an impediment that prevents her from having custody. Please, refer to fatwa 84618.
When the mother deserves custody, then the scholars differed in opinion regarding her right to give up custody of the child. Some of them are of the view that it is not permissible for the mother to renounce her custody because the custody is the right of the nursed child and not the right of the person who is providing the custody. Based on this view, Istikhaarah is not to be made to decide whether to keep custody or renounce it because istikhaarah is not permitted in matters that are not lawful.
According to the other view, istikhaarah is permissible provided that leaving the child with his father does not cause any harm to him [the child].
Also, it is the person (who has a need) who performs the istikhaarah himself and not someone else who does it on his behalf. If a woman is in her post-partum bleeding and wants to perform istikhaarah, then she supplicates with the supplication of the istikhaarah without performing the prayer.
We advise you to consider the interest of the child, and if it is in his best interest to be in your custody, then you should take custody, and your father has no right to prevent you from doing so.
Allaah knows best.