I’m don’t see why you would be having the issue you’re having, but I will suggest a way to optimize your code that could help make it easier to work with.
if (have_rows('sections')) {
while (have_rows('sections')) {
the_row();
get_template_part('template-parts/sections/section', get_row_layout());
}
}