Hi There,
As per the issue you are facing it seems like you have missed the link="file"
portion inside the code.
Please check if it has all codes like this in the gallery adding portion from Backend > Customizer > Block Above Footer > Block Settings (There is example code also.Match it.):
[gallery link="file" ids="1,2,3,4"]
Thanks!