Solution (source code)

= Solution

For an infinitesimal <Weyl transformation> $\delta h^{ab}=-2\omega h^{ab}$, the definition of the stress tensor gives
$$
\delta_\omega S=\frac1{2\pi}\int d^2\sigma\sqrt{|h|}\,
\omega h^{ab}T_{ab}.
$$
The insertions are Weyl invariant by assumption, so varying the normalized path integral gives
$$
\delta_\omega\langle\phi_1\cdots\phi_n\rangle
=\frac{i}{2\pi}\int d^2\sigma\sqrt{|h|}\,
\omega\langle h^{ab}T_{ab}\phi_1\cdots\phi_n\rangle_{\rm conn}.
$$
Consequently the stated condition $\langle h^{ab}T_{ab}\phi_1\cdots\phi_n\rangle=0$ makes the correlation function Weyl invariant. Quantum failure of this condition is the <worldsheet Weyl anomaly>.