answered question
In the Catholic Church, they do not deny that a contractual/legal marriage took place, but rather was there a sacramental marriage. Therefore in the Catholic annulment process it has no bearing on the children at all. They are still the legitimate children of a legal marriage.