The following fixed the issue for me:
<?php
switch ($isBlogsPostPage){
case true:
$parentID=get_correct_id($post, $isBlogsPostPage);
break;
default:
$parentID=get_correct_id($post);
}
$args = array(
'post_type' => 'page',
'posts_per_page' => 10,
'post_parent' => $parentID,
'orderby' => 'menu_order'
);
$parent = new WP_Query( $args );
if ( true ) : ?>
<section class="links border shadow">
<ul>
<?php while ( $parent->have_posts() ) : $parent->the_post();?>
<li class="child-title <?php if ((is_page(get_the_ID())) || (get_the_ID()===(int) get_option( 'page_for_posts' ) && $isBlogsPostPage)) echo ('active'); ?>">
<a href="https://wordpress.stackexchange.com/questions/336595/<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</li>
<?php /*endif;*/ wp_reset_postdata(); ?>
<?php endwhile; ?>
</ul>
</section>
<?php endif; wp_reset_postdata(); ?>