diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
index 21127dc755..13f5a0b097 100644
--- a/src/wp-includes/class-wp-query.php
+++ b/src/wp-includes/class-wp-query.php
@@ -3264,6 +3264,7 @@ class WP_Query {
 
 					if ( 'ids' === $q['fields'] ) {
 						$this->posts = $post_ids;
+						$this->post = $this->next_post() ?? null;
 
 						return $this->posts;
 					} elseif ( 'id=>parent' === $q['fields'] ) {
@@ -3285,6 +3286,8 @@ class WP_Query {
 							$this->posts[] = $obj;
 						}
 
+						$this->post = $this->next_post() ?? null;
+
 						return $post_parents;
 					} else {
 						_prime_post_caches( $post_ids, $q['update_post_term_cache'], $q['update_post_meta_cache'] );
