The OU conducted a thorough study in order to understand why Jews leave the fold. You can read it here.
If I can summarize over 100 pages in one word: "Experience". Those who left had negative *emotional* experiences. Period. Full stop. NOBODY said: "I LOVED being frum. I was part of a GREAT family. Yeshiva was AMAZING!!! I had INCREDIBLE Rabbeim. But then I heard that Chuckie Darwin didn't read Parshas Breishis כפשוטו and that was IT. Today I am married to a Korean women/man I met in law school."
Solution: Try to make a Torah lifestyle as exciting and attractive as possible for your family. Minimize all negativity [although like everything in life it has its place]. Emphasize love and the positive. If you HAVE to criticize - criticize yourself. Or Trump. Or Biden. Definitely Obama. Not your child. Keep it very rare and infrequent.