Many Protestant denominations recognize the Sacrament of Baptism, and baptize “In the Name of The Father and of The Son and of the Holy Spirit”. The Roman Catholic Church recognizes many such baptisms and describes them with the name “conditional”.
If The Church says that such baptisms have a degree of validity, then they do. What’s interesting to explore is how the chain going back to Jesus and John The Baptist is kept unbroken. We know that John baptized Jesus and that Jesus made the first disciples into the modern equivalents of Bishops, just as He decreed that Peter “The rock upon whom I build My Church” would be the first Pope.
We know that those first bishops ordained priests. Their authority to provide The Sacrament of Ordination, including the “laying on of hands” from older bishops was unquestioned since it came directly from Christ, Who many had seen and heard. No one doubted that they had the authority to ordain priests and provide the other Sacraments.
It is possible, in fact, to trace an unbroken chain of Catholic authority stretching all the way from John the Baptist to, for instance, a seemingly final link in that particular chain, Martin Luther. When we wonder how Martin Luther got the power to be the leader of a church, we find that there was political influence involved. Lots of local princes didn’t want to see hard cash being sent from their principalities to Rome. They eagerly helped set Luther up to impose a new religion that would make them richer.
By some stretch of the imagination, we could maybe say that Luther, as an ordained priest, could have baptized, but it’s hard to imagine how he could have the power to ordain others to ordain others to ordain still later generations when he’s in schism with The Church and Catholics who continue to be, in actual fact, living links in the unbroken chain that Rome represents.
But, since The Church recognizes some validity in those baptisms, we may infer that the very power of the Name of the Holy Trinity provides the value there is in non-Catholic baptisms performed by links in other chains that have broken off.