The masculine/feminine energies exist regardless of gender, they are another duality. The male gender is a mix of both energies, generally in an 80/20 ratio favoring masculinity. Same for the female gender being a mix of both, but heavily weighted towards femininity.
In the same way, “God” would have and express these energies as well. The masculine energies of “God” have been understood as God the Father, and the feminine energies of “God” have been understood as the Goddess/The Holy Spirit.
That doesn’t mean that “God” is either male or female, it’s just a human conceptualization to try and understand spiritual energies.