So, if we limit ourselves to their specific criteria, then what? Are we to think they just didn't understand the already-defined dogma? I know this discussion frequently becomes contentious and unsavory, but I hope to keep it calm and charitable.
Both of them wrote on various aspects and minutia of the Faith. In this case, the question of whether a Catechumen can still be saved if he dies right before Baptism. Therefore, it is in the realm of the theologians to rationalize how one may or may not be saved. But that is a very particular issue that is not expected to be believed by the wider faithful.
St. Alphonsus outlined the criteria of a knowledge and belief in the Incarnation and the Holy Trinity as utterly necessary to be saved in such a scenario. I disagree with this conclusion because the Church has spoken that Catechumens are not members of the Body until Baptism. But that doesn't mean Ss. Alphonsus or Thomas are denying a dogma, just laying out the reasoned principles as to how it could be possible.
Yet, the problem arises here when laymen see this opinion and then latch onto it as dogmatic teaching just because esteemed theologians taught it. And it has since snow-balled into outright heresy with this idea that souls can be saved in false religions, but not by them, by merit of the Church. Which is nonsense, because this precludes Jєωs, Muslims, pagans, atheists, etc. as possibly saved without baptism because they have natural virtue and love of truth. Every single trad priest and bishop, I know of, believes this today.
So now, we have laymen already confused by the Crisis, imbibing such a pernicious error as if it were dogma and then turning around and attacking those who hold to the actual dogma of EENS and water baptism; simply because their priests and bishops themselves teach and believe it.