With this chain of narration, the report states that Umar asked the Prophet ﷺ about that, and he instructed him to take her back until she became pure, then divorce her while pure without having had intercourse with her. He also said that he should divorce her at the beginning of her waiting period.
و حدثنا عبد الوارث بن عبد الصمد حدثني أبي عن جدي
بهذا الإسناد وقال في الحديث فسأل عمر النبي ﷺ عن ذلك فأمره أن يراجعها حتى يطلقها طاهرا من غير جماع وقال يطلقها في قبل عدتها