I found the cause of the problem I was having. Since the post type I was working on was woccommerce orders (shop_order), I had to enter the post status correctly.
The edited code is as follows:
add_action('save_post', 'change_child_posts_meta', 10, 2);
add_action('post_updated', 'change_child_posts_meta', 10, 2);
function change_child_posts_meta($post_id, $post)
{
if ( $post->post_parent == 0 && 'shop_order' == $post->post_type) {
$mettta = get_post_meta( $post->ID , "_post_color" , true );
$args = array(
'numberposts' => -1,
'post_type' => 'shop_order',
'post_parent' => $post->ID,
'post_status' => array('wc-pending','wc-processing','wc-on-hold','wc-completed','wc-cancelled','wc-refunded','wc-failed','wc-shipping-progress')
);
$ChildIDs = get_posts( $args );
foreach ($ChildIDs as $childID) {
update_post_meta( $childID->ID, "_post_color", $mettta );
}
}
}