I had to look it up because I was under the impression that only published posts would be returned but
post_status (string / array) – use post status. Retrieves posts by Post Status. Default value is ‘publish’, but if the user is logged in, ‘private’ is added. Public custom statuses are also included by default. And if the query is run in an admin context (administration area or AJAX call), protected statuses are added too. By default protected statuses are ‘future’, ‘draft’ and ‘pending’.
For anyone else facing the dilemma of ACF pushing links unpublished posts with the Page Link ACF type, here’s the work around I used.
The key here is permalinks. If you’re using pretty permalinks (and you should be) published posts will use the pretty permalinks, but unpublished posts won’t.
So, you can use PHP’s strpos(); to check the variable for specific words in the course permalink. Here’s my example:
<?php // Get the Post ID
$pid = get_field('course_selection', false, false);
// Use that to generate the permalink
$ppl = get_the_permalink($pid);
// If the permalink (string) doesn't contain 'post_type' show it, cuz it's using pretty permalinks, and therefore has been published
if(!strpos($ppl, 'post_type')): ?>
// Your code here
<?php endif; ?>