The act is still sterile if the heterosexual couple is sterile. Yes the action is the same, but again, the purpose and intention is totally and completely different. Cena said that sexual actions not directed at procreation are deviant. So I ask this question, are sexual actions between an infertile couple deviant or not? If not why not? Let us then assume that the couple could have a child if they were to take fertility enhancers, would the couple then be prohibited from having sex, unless they took the fertility treatment. Sex must have some other purpose other than procreation, otherwise the infertile couple automatically engages in deviant sex.
When a man and woman have sex in the normal way, they are acting procreatively. Their marital embrace looks procreative. If all things line up in the proper way “behind the scenes” then the act
will be procreative and produce a child. But these things don’t need to line up. All the man and woman have to do is play their part properly and in good faith. This means not frustrating it artificially, through Sodomy, Onanism, barrier methods, spermicide, abortifacients, or whatever other evil means Man can dream up. If one or the other happens to be sterile, either temporarily or permanently, under God’s will, this does not change their intent or their actions, which are innocent and obedient to God.
Deviating from God’s plan for marriage, however, has consequences. A man and woman having sex before marriage, or with someone not their spouse, are perverting the unitive aspect of sex, and becoming “one flesh” illicitly with the structure of commitment and permanence, without the approval of the community and the Church, furtively in secret and not openly declaring love before God and man. So this is why sex outside of marriage is wrong, even for a man and a woman performing a procreative act. They have divorced one significance from the other, and destroyed the purpose of sex as written in the Divine Law. The same can be said for In-Vitro Fertilization, which separates procreation from sex altogether.
By the same token, a homosexual couple ignores the procreative aspect of sex by doing something that is inherently sterile. They are misusing their sexual organs, and sexual faculty, for mutual pleasure outside of marriage and outside of the framework defined by biology as something that can result in children. Divine Law is totally consistent here, the morality of the act is based on the quality of the actions of the participants. A sterile couple having sex is not doing anything wrong, while a couple having sterile sex is violating the law.
tl;dr: sex has two significances: unitive and procreative. BOTH must be fulfilled in order for an action to be licit. If only one or none is present, the act is a sin.