That sex ratio will be favored which maximizes the number of descendants an individual will have and hence the number of gene copies transmitted.

I don't know what function which perform here. Is it a relative pronoun? If it is, what is its antecedent?

Thank you.
It is a relative pronoun, subject of "maximizes"; its antecedant is "the sex ratio".
It is the sex ratio which maximizes ... that will be favoured.
Ohhh!!!! Got it! Thank you so much.