Heretics can be validly baptized, though illicitly and unfruitfully
See also: St. Thomas Aquinas - Baptism received with insincerity
The Church teaches that heretics can receive valid Baptism, provided the proper form and matter are observed. However, such a Baptism is illicit, and they do not receive the effects of the sacrament, only the indelible character, because their heresy places an obstacle to grace.
They will receive the effects of Baptism once they renounce their heresy and embrace the traditional Catholic faith.