"Please provide database dump file(ZIP file) of your website, also point out the problem page and content template URL, I need to test and debug it in my localhost, thanks https://toolset.com/faq/provide-supporters-copy-site/"
Thanks for the details, I can import the database dump file in my localhost with a fresh wordpress installation + the latest version of Toolset plugins, and it works fine in my localhost, I can see 13 image items in the Gallery block of post "17 January 2020".
See screenshot Gallery.JPG
So there should be some compatibility issue in your website, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here: https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP, and test again
3) If you need more assistance to locate the problem, please provide a full copy of your website in below private message box.
You can put the duplicator package file in your own google drive disk, and share the link only.
I disabled plugins and switched theme, but found that was not the issue.
I found that moving the condition to being around the H2, rather than around the whole for-each loop, fixed the issue.
So I think there is an issue with Toolset with nested for-each of 10+, inside a condition.
The reason it worked ok when you tested on Twenty Theme, is that you would have had to remove the condition for it to work, as the condition contains a function from functions.php of the original theme.