Use the second parameter $post_type
passed to manage_posts_columns
and ignore adding the column if it matches elementor_library
:
add_filter( 'manage_posts_columns', 'customfield_add_column', 5, 2 /* <= Make sure you add the 2 here to pass the second parameter to your callback */ );
function customfield_add_column( $defaults, $post_type = null ) {
if ( $post_type !== 'elementor_library' ) {
$defaults['my_custom_field'] = __( 'MyField' );
}
return $defaults;
}