Ok, I went to an Iphone store today and tested to visit your demo site on some new Ipads. I can say it almost worked perfectly every time.
But when I tested your demo site on an Iphone SE (which also is a quite new Iphone) it worked maybe 70 % of the times. Also, on my old Ipad running IOS 9.3.5 the problem exists.
(When I did the test, I clicked on the penultimate image; and then next time (after having reloaded the page) on the very last one. And this, on repeat.)
Se my test with the Iphone SE
Program version 14.7.1
https://streamable.com/6evdvp
I am not sure, but maybe it is easier to discover the problem if you test to build a post grid of 2 x 4 and then randomly click on different pictures of the grid? Remember to reload the page every time.