transform.DetachChildren() is deactivating my children's scripts after detaching from the parent

I’m using transform.DetachChildren() in the OnDestroy() method to have my children be unaffected by the destruction of the parent game object.
The problem I have is:
transform.DetachChildren() is deactivating my children’s scripts after detaching from the parent.
is there a way to have my children that are detached to remain active after detaching them from their parent.

private void OnDestroy()
        {
            foreach (Transform childT in transform)
            {
                childT.parent = FindObjectOfType<GameManager>().enemyContainer.transform;
                //childT.GetComponent<Health>().currentHealth = 0;
                //childT.parent = null;
            }
            //transform.DetachChildren(); deactivates the scripts
        }

Hello @Treven ! You can enable scripts this way:

childT.GetComponent<ScriptName>().enabled = true;

However it would be better if you investigate a little bit about it. Just by creating two new gameObject and writing the simplest scripts possible. Then make it more complex, more similar to what you have right now, step by step. Test it as many times as you can, so you can see what is causing the problem.