Kids
My ex husband grew up in an extremely dysfunctional family. When I dated him, the fridge at his house was always empty but they had a swimming pool and one or more dogs.
He was buying food and hiding it in his bedroom. His relationship to food was so extremely dysfunctional, our oldest child made his peace with his father after reading a biography about a Korean guy born and raised in a concentration camp who related to food similarly and realizing that somehow his "middle class" American father related to food like "a concentration camp survivor."
Not just a survivor but someone born and raised in a concentration camp who viewed their own mother as a competitor for their food.
Our eldest stopped being enraged at dad. Still wants nothing to do with him.
While the ex's parents couldn't be arsed to feed the kids, they kept alive literal fairytales out of their own pocket. The kids got two Easter baskets every year, one hidden by the Easter Bunny. They got Christmas gifts from Santa Claus. They got money from the tooth fairy.
And with all this completely deluded nonsense about how life SUPPOSEDLY worked and his parents investing time, energy and money in giving life to mirages, when their dad spent the last several years of the marriage living in another state with another woman and telling the kids "It's NORMAL for military families to be separated.", the ex bought this blatant lie hook, line and sinker.
Yes, it's not uncommon for military members to get temporary duty elsewhere and be unable to take the kids with them. It's NOT normal to live in different US states because they bought a house in one and Mom told Dad "I'm staying with my house." while Dad lives with another woman and her two kids while everyone speculates about whether or not he's the biological father of those kids and wonders what does their ages possibly imply about the length of their illicit relationship.
We were married about ten years and owned a house when the future ex said to me out of the blue "You're right. If I got orders for Colorado and you told me I'm staying with my house in Kansas, I might as well divorce you before I leave because if the marriage isn't dead already, it will be after living apart for a few years."
When I decided to divorce him, I told the kids first. One son said in reply to the announcement "Finally!" There was no shock about there being trouble in paradise, just relief that it would be over soon.
It would be another year before I told the future ex and he immediately told me he didn't want to tell the kids. He wanted to secretly make divorce arrangements and then when he was comfortable with everything, emotionally throw the kids off a cliff and PROMPTLY leave so he didn't need to be emotionally uncomfortable and dealing with the kids and their feelings.
He was livid when I told them "They already know. I told them first."
But it seems to me that a closeted gay woman molesting her "son" who later concluded "I'm not really a boy. I'm really a girl." is the strongest piece of evidence I am aware of that some people really, truly are born the wrong physical gender or sex.
If you are AMAB and have ever been sexually harassed or assaulted by presumably heterosexual males, that implies they knew you weren't really male.
Your female spouse may not really be straight and may have married you precisely because you are not like other men. I once saw a piece on Reddit where someone AMAB came out as trans and the wife said "I'm gay!" Reddit comments included "Joke's on you. I'm into that."
And the kids who have probably lived with you their entire lives know a lot more about you than most people do.
Continuing to live a lie is very likely to raise a delusional dysfunctional adult who believes in fairytales like my ex husband who probably thought I was FOOLED by his pathetic lie about "massages for his bad back" after hours not covered by his excellent military medical insurance during our divorce.
Reality:
I knew that made absolutely no sense and he should have had daytime appointments covered by his insurance or at the hospital on base if it was really prescribed for his back.
We were getting divorced and didn't have the money to support two households and not my business what he was really doing, which was probably seeing a prostitute.
I had a don't ask, don't tell policy during that time as a form of politeness.
Insanity boils down to believing things that are divorced from reality. I think actively lying about reality to your children harms their ability to navigate reality and is a serious disservice.
And they may not be as shocked as you expect. Like my son blurting "Finally!," they may indicate they've always known you aren't like other dads and it's a relief for you to finally admit it.