It is shown that any derived scheme over $\mathbb C$ equipped with a $-2$-shifted symplectic structure, and having a Hausdorff space of classical points, admits a globally defined Lagrangian distribution as a dg $\mathbb{C}^{\infty}$-manifold. The main tool for proving this theorem is a strictification result for Lagrangian distribution. It is shown that existence of a global Lagrangian distribution allows us to realize the moduli space of sheaves on Calabi-Yau fourfolds as a derived critical locus of a potential of degree $-1$ on the moduli space of $Spin(7)$ instantons.