Praise be to Allah
Once khula has taken place between the spouses, the marriage contract between them is annulled, according to the more correct scholarly view. Many of the scholars are of the view that khula counts as an irrevocable divorce in the minor sense. According to both views, there is no way that the husband can take the wife back during the iddah if khula has taken place. But the majority of scholars are of the view that it is permissible for him to remarry her during the iddah with her consent in a new marriage contract and with a new mahr (dowry). This has been discussed in detail in fatwa no. 202629.
If you separated from your wife by means of khula, and the khula was done in words that clearly expressed khula or other words that expressed the same meaning, then in that case the marriage contract between you was annulled from the moment the khula occurred. Hence what you did of having intercourse after the khula is something haraam (forbidden), for which you have to ask for forgiveness from Allah. This intercourse does not count as taking her back, according to scholarly consensus, because you had no right to take her back in the first place.
But if the khula was not done in words that clearly expressed khula or other words that expressed the same meaning, rather it only happened by means of agreeing to it, then this is not regarded as anything and does not result in annulment of the marriage; rather the marriage is only annulled with khula, and khulaonly occurs with the offer and acceptance. This has been discussed previously in fatwa no. 200341
In fatwa no. 186809 we have explained that khula at the time of menses is permissible and valid.
However we should point out that the one who is observing iddah following khula should not observe iddah with her husband in such a way that she mixes freely with him; rather she should observe iddah in her family's home, or in any other place she likes. It is permissible for her to observe iddah in her husband's house if she has a place that is separate from him and has her own facilities, so that she will be safe and will not mix freely with the one who was her husband. This has been explained in detail in fatwa no. 196077
And Allah knows best.
Reproduced from Islam QA