From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
Here an important pastoral consideration must be added. According to the logic of the positions mentioned above, an individual could, by virtue of a fundamental option, remain faithful to God independently of whether or not certain of his choices and his acts are in conformity with specific moral norms or rules. By virtue of a primordial option for charity, that individual could continue to be morally good, persevere in God’s grace and attain salvation, even if certain of his specific kinds of behaviour were deliberately and gravely contrary to God’s commandments as set forth by the Church.
In point of fact, man does not suffer perdition only by being unfaithful to that fundamental option whereby he has made “a free self-commitment to God”.113 With every freely committed mortal sin, he offends God as the giver of the law and as a result becomes guilty with regard to the entire law (cf. Jas 2:8-11); even if he perseveres in faith, he loses “sanctifying grace”, “charity” and “eternal happiness”.114 As the Council of Trent teaches, “the grace of justification once received is lost not only by apostasy, by which faith itself is lost, but also by any other mortal sin”.115
113 Second Vatican Ecumenical Council, Dogmatic Constitution on Divine Revelation Dei Verbum, 5. Cf. Sacred Congregation for the Doctrine of the Faith, Declaration on Certain Questions regarding Sexual Ethics Persona Humana (December 29, 1975), 10: Acta Apostolicæ Sedis [AAS] 68 (1976), 88-90.
114 Cf. Post-Synodal Apostolic Exhoration Reconciliatio et Pænitentia (December 2, 1984), 17; AAS 77 (1985), 218-223.
115 Sess. VI, Decree on Justification Cum Hoc Tempore, Chap. 15: H. Denzinger-A. Schönmetzer, Enchiridion Symbolorum Definitionum et Declarationum de Rebus Fidei et Morum [DS], 1544; Canon 19: DS, 1569.
— Veritatis Splendor 68