I have a problem with the repeater-field, repeating a wysiwyg-field with shortcodes.
It seems that the part <?php if(have_rows('lists')): ?>
already executes all shortcodes contained in the wysiwyg-fields inside ‘lists’.
The result is, that all galleries in those wysiwyg-fields appear before (outside) the actual repeater-content. In the repeater-content itself, the shortcodes are already stripped out.
I’m not sure I understand the issue.
The have_rows function will load the repeater field’s data and check that there are rows available. The WYSIWYG sub field values will also be loaded, and the values will be formatted (shortcodes will be run).
Perhaps the issue is with your shortcodes. Normally, a shortcode filter would modify the content, not echo out some HTML.
Is it possible that you can change your shortcode filters to return the value instead of outputting it?