Suppose non-trivial vacuum configuration of the Yang-Mills theory with the winding number $n$:
$$
\tag 1 A_{\mu}(x) = g_{(n)}(x)\partial_{\mu}g^{-1}_{(n)}(x)
$$
The winding number is given by the surface integral of topological density over the 3-sphere:
$$
\tag 2 n = \frac{1}{24\pi^{2}}\int_{S^{3}} d\sigma_{\mu}\epsilon^{\mu\nu\alpha\beta}\text{tr}\big[(g_{(n)}\partial_{\nu}g_{(n)}^{-1})(g_{(n)}\partial_{\alpha}g_{(n)}^{-1} )(g_{(n)}\partial_{\beta}g_{(n)}^{-1} )\big] \
$$
In various literature sources (for example, in Rubakov's "Classical gauge fields. Bosons") people often rewrite the surface integral $(2)$ in terms of volume integral:
$$
\tag 3 n = -\frac{1}{16\pi^{2}}\int d^{4}x\text{tr}\big[F_{\mu\nu}\tilde{F}^{\mu\nu}\big],
$$
where $F$ is the gauge field strength and $\tilde{F} = *F$ is its dual. They claim that $(3)$ and $(2)$ are equivalent. But in fact $(2)$ gives non-zero integer result for the pure gauge $(1)$, while $(3)$ vanishes! This can be seen by choosing the 4-dimensional euclidean manifold to be the "cylinder", with the planes being defined by $\tau = \pm \infty$. Then in the gauge $A_{0} = 0$ we obtain from $(3)$
$$
\tag 4 n = n(\tau = \infty) - n(\tau = -\infty)
$$
The precise reason is that we include $\epsilon^{\mu\nu\alpha\beta}\text{tr}\big[\partial_{\mu}F_{\nu\alpha}A_{\beta}\big]$ term in the action when converting the surface integral into the volume integral.
So why do people say that $(2)$ and $(3)$ are equivalent?