I've seen a lot of these cases. The best thing you can do is be nearby so that you can be there for your children! Remain friendly with the mom of course, as to avoid any unnecessary complications. It's very unfortunate that people can't accept their loved ones for whom they are, but whom they believe they should be. We don't decide other peoples realities. That decision is on the beholder, not the viewer.
Be supportive, continue to be who you are, and reach that goal you crave and desire so much of being your true, authentic self! Heck, there may come a day she looks at you, sees your overwhelming joy & happiness, and may be filled with thoughts of regret. You can always be her friend, so long as she doesn't continue to criticize you even as a friend. In which case I would probably stop even that level of communication and solely focus on being there for the kids.
The last thing you want is to be hundreds of miles away, in agony towards thoughts of your children feeling abandoned, or forgetting whom their other parent is. That's not a good place to be. Especially when you love them, and they love you.
I can't say I know for certain what it feels like to go through that with your own biological kids. I did go through something similar. My ex girlfriend had a kid when she broke up with the baby's daddy. We fell in love with each other at that time. I've been through everything with that baby for over 2 years. I raised her, fed her, bathed her, changed her diapers, took her out to places, walked around and watched her smile as she pointed at the bumble bees, and even when she was little would take her out for walks in her stroller all over the beautiful landscapes and had what I considered to be some of the most peaceful days of my life.
My ex girlfriend would always complain about how feminine I am, and that she wasn't attracted to feminine qualities in a man, and that she wanted a "man". She'd constantly mention it to me, her family, and her friends. It was a bit bothersome yes, but I didn't let it affect my judgement. I still continued to be the best parent I could be for the child that wasn't mine, yet I saw her as my child regardless. I even told other people yes when they asked if she was my daughter.
2 years later, she broke up with me, and I had to move back to my home states away. All I could think about was the daughter, and how hurt she must feel losing someone that was a huge part of her life. I even told my family many times that I missed the baby far more than the mom. I was right. Even years later when I talked to her mom over the phone, her daughter knew it was me, and started crying her eyes out, saying she missed me so much. That was traumatizing to not just me, but the daughter as well.
Please don't put you and your kids through that.
It took me years to get over that, and move on.
The interesting thing is not just her, but all of her cousins that I used to babysit remember me to this day (nine years later) as well, and reach out to me on social media from time to time to see how I'm doing. I'm always here if they need someone to talk to. They think it's wonderful that I've come out, began transitioning, and support me 100%.