I remember having a similar issue in a passed and checking if someone published custom post type first was solving the issue for me, something like this:
add_action( 'transition_post_status', 'post_create_on_publish_only', 10, 3 );
function post_create_on_publish_only( $new_status, $old_status, $post ) {
if ( ( $new_status == 'publish' ) && ( $old_status != 'publish' ) && ( $post->post_type == 'recipe' ) ) {
$my_post = array(
'post_title' => get_the_title($post),
'post_status' => 'publish',
'post_type' => 'wpcf7_contact_form',
);
$get_post = get_page_by_title(get_the_title($post));
if ( !is_page($get_post->ID) && did_action( 'transition_post_status' ) === 1){
$id = wp_insert_post( $my_post );
}
} else {
return;
}
}