We investigate one mechanism of the change in the isotopic composition of cosmologically distant clouds of interstellar gas whose matter was subjected only slightly to star formation processes. According to the standard cosmological model, the isotopic composition of the gas in such clouds was formed at the epoch of Big Bang nucleosynthesis and is determined only by the baryon density in the Universe. The dispersion in the available cloud composition observations exceeds the errors of individual measurements. This may indicate that there are mechanisms of the change in the composition of matter in the Universe after the completion of Big Bang nucleosynthesis. We have calculated the destruction and production rates of light isotopes (D, 3He, 4He) under the influence of photonuclear reactions triggered by the gamma-ray emission from active galactic nuclei (AGNs). We investigate the destruction and production of light elements depending on the spectral characteristics of the gamma-ray emission. We show that in comparison with previous works, taking into account the influence of spectral hardness on the photonuclear reaction rates can increase the characteristic radii of influence of the gamma-ray emission from AGNs by a factor of 2-8. The high gamma-ray luminosities of AGNs observed in recent years increase the previous estimates of the characteristic radii by two orders of magnitude. This may suggest that the influence of the emission from AGNs on the change in the composition of the medium in the immediate neighborhood (the host galaxy) has been underestimated.