Okay I solved it, will put the code if anyone ever needs it 🙂
add_filter( ‘rank_math/sitemap/posts_to_exclude’, function( $posts_to_exclude ){
$posts_ids = [];
$posts = get_posts();
foreach ($posts as $post) {
if($post->post_content == “”) {
$posts_ids [] = $post->ID;
}
}
return array_merge( $posts_to_exclude,$posts_ids );
});
Hello,
Thank you for contacting Rank Math today.
Thank you for sharing it, I am sure it will be really useful for a lot of users. If you have any other questions or issues, we are here to help you.
Looking forward to helping you. Thank you.