See the documentation for GetComponentsInChildren
:
public Component[] GetComponentsInChildren(Type type, bool includeInactive = false);
This states you can use the boolean includeInactive
in GetComponentsInChildren
to also get the inactive components. This way you can grab all the transforms. Even inactive ones.