Improvements to the photostability of organic glasses for use in electronic applications have generally relied on the modification of the chemical structure. We show here that the photostability of a guest molecule can also be significantly improved-without chemical modification-by using physical vapor deposition to pack molecules more densely. Photoisomerization of the substituted azobenzene, 4,4'-diphenyl azobenzene, was studied in a vapor-deposited glass matrix of celecoxib. We directly measure photoisomerization of trans- to cis-states via Ultraviolet-visible (UV-Vis) spectroscopy and show that the rate of photoisomerization depends upon the substrate temperature used during co-deposition of the glass. Photostability correlates reasonably with the density of the glass, where the optimum glass is about tenfold more photostable than the liquid-cooled glass. Molecular simulations, which mimic photoisomerization, also demonstrate that photoreaction of a guest molecule can be suppressed in vapor-deposited glasses. From the simulations, we estimate that the region that is disrupted by a single photoisomerization event encompasses approximately 5 molecules.