I contacted the developer of the plugins. They made some adjustments and now the gallery lightbox is working fine.
This does not solve the problem.
There are only two photo gallery plugins (both by the same developer: one for gallery, one for google photos integration) running.
Deactivating both plugins turns off google photo integration which is needed.
By the way, I found this thread from year 2016, but it seems that there is no such line in avia.js anymore: