The son could be not moral and cause pain upon the parents, even if the parents teaches the son.
The Bible is honest and Isaac and Rebekah had an wicked son. He didn't want to be pure and he loved sin.
He married pagan woman that didn't honor the Lord, Esau had no desire for God and the Bible.
If a godly parent have a rebel son, that parent needs to pray for that son. God hears prayers and will work in the sinner's heart.
I believe that people are blessed when they have a family but there is no perfect family. So the parents needs to bring their sorrows to the Lord. The Lord will comfort the parents and transform on the sinful heart of the children.