In many String Theory texts (e.g. Polchinski), when discussing the bosonic string in presence of background fields $G_{\mu\nu}$, $B_{\mu\nu}$ and $\phi$, respectively symmetric and antisymmetric tensor and scalar fields, three $beta$ coefficients are introduced ($\beta^G_{\mu\nu}$, $\beta^B_{\mu\nu}$, $\beta^\phi$).
The coefficients multiply terms corrispondent to the three background fields in the Weyl variation of the action. To guarantee Weyl invariance of the theory, they must be put equal to zero.
Then it is also commonly said that it can be shown that $\beta^G_{\mu\nu}=\beta^B_{\mu\nu}=0 \implies \nabla_\nu \beta^\phi = 0$.
I have some difficulties to prove the result, although elementary.
I will use here the same notation of the original paper of Callan et al. (https://doi.org/10.1016/0550-3213(85)90506-1).
The $\beta$ coefficients are
$\beta^G_{\mu\nu} = R_{\mu\nu}-\frac{1}{4}H_\mu^{\ \lambda\sigma}H_{\nu\lambda\sigma}+2\nabla_\mu\nabla_\nu\phi+O(\alpha^\prime)$,
$\beta^B_{\mu\nu}=\nabla_\lambda H^\lambda_{\ \mu\nu}-2(\nabla^\lambda \phi) H_{\lambda\mu\nu} + O(\alpha^\prime)$ and
$\beta^\phi = \frac{D-26}{48\pi^2}+\frac{\alpha^\prime}{16\pi^2}(4(\nabla \phi)^2 -4\nabla^2 \phi -R +\frac{1}{12} H^{\mu\nu\lambda}H_{\mu\nu\lambda})$,
where $R_{\mu\nu}$ is the Ricci tensor, $R=R^\mu_{\ \mu}$ and $H_{\mu\nu\lambda} = 3\nabla_{[\mu} B_{\nu\lambda]}$.
The Bianchi identies applied to $R_{\mu\nu}$ and $H_{\mu\nu\lambda}$ give respectively $\nabla^\mu R_{\mu\nu} = \frac{1}{2}\nabla_\nu R$ and $H_{\mu\nu\lambda}\nabla^\mu H_{\rho}^{\ \nu\lambda}=\frac{1}{6}\nabla_\rho (H_{\mu\nu\lambda}H^{\mu\nu\lambda})$.
In the mentioned paper, the main passage to prove that $\beta^\phi$ is constant, consists in showing that $0 = \nabla^\mu \beta^G_{\mu\nu} = \nabla^\mu \left(R_{\mu\nu} - \frac{1}{4} H_{\mu\rho\lambda}H_{\nu}^{\ \rho\lambda} + 2\nabla_\mu \nabla_\nu \phi \right) = \nabla_\nu \left(-2(\nabla\phi)^2 + 2\nabla^2\phi + \frac{1}{2}R - \frac{1}{24}H_{\mu\nu\lambda}H^{\mu\nu\lambda} \right)$.
Now, if I apply the Bianchi identities to the first two terms of $\nabla^\mu\beta^G_{\mu\nu}$, apparently the last equality holds if $R_{\mu\nu}\nabla^\mu \phi = 0$, which does not seem to me to hold in general. What am I missing?