There is nothing you can do

There is nothing you can do that can cause another person to have an affair, put your family through pain and hardship and potential danger. That was her choice alone. You may have areas you can improve but nothing can justify an affair. She was free to divorce you and not have an affair, she chose the affair. She is responsible for her choices as you are for yours.
Maybe try a counselor or life coach specializing in infidelity?
So sorry you are experiencing this. You can’t make her do anything. You can work on yourself and heal and grow though.
In my experience a person having an affair behaves very much like an addict. Nothing they do will make sense to a sane person. The risks, the damage, the lies. You will drive yourself crazy trying to make sense of an addict and what they do or tell you. If you believe in God pray for them and try to heal yourself. She is in his hands. Nothing you do or don’t do can get her to come around. God has his timing.