In Landau and Lifshitz Mechanics, $\S50$ Canonical variables a time-independent Hamiltonian is considered, and a canonical transformation is done such that adiabatic invariant $I$ becomes the new momentum. Then the angle variable is found as
$$w=\frac{\partial S_0(q,I;\lambda)}{\partial I},$$
where $S_0$ is abbreviated action (and generating function for the canonical transformation), $q$ is old position variable and $\lambda$ is a constant parameter.
Now L&L say:
Since the generating function $S_0(q,I;\lambda)$ does not depend explicitly on time, the new Hamiltonian $H'$ is just $H$ expressed in terms of the new variables. In other words, $H'$ is the energy $E(I)$, expressed as a function of the action variable. Accordingly, Hamilton's equations in canonical variables are $$\dot I=0,\;\;\;\dot w=\frac{\mathrm dE(I)}{\mathrm dI}.\tag{50.4}$$
Now my question is: why does $H'=E$ not depend also on $w$? $H$ does in general depend on old position variable $q$ (even if it does not depend explicitly on time), so why shouldn't $H'$ depend on angle variable?