Can i check if a post with the title "great title" exists even if this post status is set to "draft" with the function:
post_exists("great title") ?
post_exists("great title") runs the following SQL:
SELECT ID FROM $wpdb->posts WHERE 1=1 AND post_title = 'great title'
so there's no post status or post type restriction.
Check the docs on
post_exists() for more info.
If you want to restrict by post type, you can use:
$found_page = get_page_by_title( "great title", $output = OBJECT, $post_type = 'page' );
See the docs here.