Unlock the Potential of Counterfactually-Augmented Data in Out-Of-Distribution Generalization