Praise be to Allah.
If a man divorces his wife during a period of purity in which he had intercourse with her, it is an innovated divorce (talaaq bid‘i), and does not count as a divorce according to the correct scholarly opinion. Please see the answer to question no. 106328. This applies so long as the matter has not been referred to a shar‘i court which ruled that the divorce does count as such, or so long as the husband who issued the divorce had consulted a scholar who issued a fatwa saying that the divorce counts as such, then he acted on the basis of that fatwa and counted it as a divorce. In such cases he does not have the right, after issuing another divorce, to have second thoughts about the previous divorce. We have discussed this in the answer to question no. 158115.
If a man divorces his wife for a specific reason, then it becomes clear that this thing did not happen, his divorce does not count as such, according to the more correct opinion – for example, if he believed that she was spying on him, so he divorced her, or he heard something bad about her, so he divorced her, then it became clear that she was innocent of that. This has been discussed previously in the answer to question no. 36835.
Based on that, if your husband only issued the third divorce because of your spying on him – as he thought or believed – then it became clear that you were not spying on him, this divorce does not count as such.
Your husband has to fear Allah, may He be exalted, and refrain from uttering words of divorce.
We ask Allah to set your affairs straight and reconcile your hearts.
And Allah knows best.