Seems I found the issue shortly after posting this, go figure…
I was just missing a semicolon at the end of
$section_id = get_sub_field('section_id')
I figured out that the post data was causing an issue adding in wp_reset_postdata() before the final endwhile solved the issue.
<?php endforeach; ?>
</div>
<?php wp_reset_postdata();
endwhile;
endif;?>
</div>