I question this. It would stand to reason that if this were true then all validly baptized Protestants who contracted a marriage would necessarily be in an invalid marriage. Can you quote the Canon that supports this ?
The have to be baptized in the Catholic Church to Catholic parents. If they were baptized by Prots and raised by Prots, their marriages would be valid.
Taught not only at STAS, but explained to me also by several Catholic priests, including then-Father Sanborn:
Canon 1070
§ 1. That marriage is null that is contracted between a non-baptized person and a person baptized in the Catholic Church or converted to her from heresy or schism.
Canon 1094
Only those marriages are valid that are contracted in the presence of the pastor, or the local Ordinary, or a priest delegated by either, and two witnesses, according to the rules expressed in the canons that follow, with due regard for the exceptions mentioned in Canons 1098 and 1099.
Canon 1099
§ 1. [The following] are bound to observe the above-stated form:
1. ° All those baptized into the Catholic Church or converted to her from heresy or schism, even if these or the others have left her later, as long as they enter marriage among themselves;
2. With due regard for the prescription of § 1, n. 1, non-Catholics, whether baptized or non-baptized, if they contract among themselves, are not in any way bound to observe the Catholic form of marriage; likewise, those born of non-Catholics, even if they are baptized in the Church, [but] who from infancy grow up in heresy or schism or infidelity or without any religion, as often as they contract marriage with a non-Catholic.
So that last part refers to those who, somehow (how, I don't know) were baptized in the Catholic Church but whose parents were non-Catholics and then raised them from infancy as non-Catholics.
Actually, now that I think of it, I recall the case of that Jєωιѕн boy raised by Pope Pius IX. So, a Catholic nurse saw an infant with Jєωιѕн parents who was thought to be dying. So she baptized the boy. Yet the boy lived. Well, the boy was baptized by a Catholic (as a Catholic) but was the child of non-Catholics and raised as a non-Catholic (i.e. as a Jew). Had he grown up and married a Jewess, his marriage would not have been invalid, since, although he was baptized Catholic, his parents were non-Catholics and he would have been raised as a non-Catholic. As it was, however, Pope Pius IX had other plans.
This is actually a very interesting story (even if a slight tangent) --
https://en.wikipedia.org/wiki/Mortara_caseFor a while, the NO made an exception for those who formally renounced the faith, but Ratzinger actually rolled that back in 2009 because it was causing massive confusion.
So this is a NO Canon Law commentary --
https://canonlawmadeeasy.com/2019/09/26/why-cant-an-ex-catholic-marry-validly-outside-the-church/Effectively this means that the Church now holds everyone who was baptized a Catholic, or received into the Catholic Church after baptism in another Christian denomination, must marry in accord with canonical form (or be dispensed from this requirement in advance ...), or else the wedding is invalid.