This problem was fixed when I used the included ACF ‘Gallery’ field. And not the ACF Photo gallery loose plugin. https://wordpress.org/plugins/navz-photo-gallery/
I think the ACF Photo gallery plugin might not be fully compatible with Flexible Content.