you told that it was working? have you changed something from the working configuration?
I don’t think it is showing all the images it simply is receiving an empty arrey so is automatically populated with standard divi behaviour that is to populate the gallery with random images. First of all post the query that you have inserted instead of this one is_singular( array( 'custom-post-type' ) )
and second of all check if the slug(not the name) of the ACF field is correct
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users