The answer would have to be yes, our prayers lose their efficacy when we are in a state of mortal sin as we have chosen to separate ourselves from God, and mortal sin kills the life of grace within us. We can, however, humbly ask God for the grace of repentance. The following excerpt is from the Cathechism of the Council of Trent:
“The Second Degree Of Prayer: The Prayer Of Sinners Another degree of prayer is that of those who are weighed down by the guilt of mortal sin, but who strive, with what is called dead faith, to raise themselves from their condition and to ascend to God. But, in consequence of their languid state and the extreme weakness of their faith, they cannot raise themselves from the earth. Recognising their crimes and stung with remorse of conscience, they bow themselves down with humility, and, far as they are removed from God, implore of Him with penitential sorrow, the pardon of their sins and the peace of reconciliation. The prayers of such persons are not rejected by God, but are heard by Him. Nay, in His mercy, He generously invites such as these to have recourse to Him, saying: Come to me, all you that labour, and are heavily laden, and I will refresh you, of this class was the publican, who, though he did not dare to raise his eyes towards heaven, left the Temple, as (our Lord) declares, more justified than the Pharisee.”