If a husband divorces his wife during a period of purity when he has had sexual relations with her and then takes her back, is this considered a valid divorce and reconciliation, even if two witnesses are present for the divorce?
Bismihi ta'ala
If he divorced while she was pure, but had sex with her as well during that time, prior to reciting the divorce, or after, the divorce would not have been valid.
Divorce needs to take place after a wife has her cycle, and is pure (fi tuhr ghayr muwaqa'ah).
And Allah knows best.