- Assume
(i) that the kinetic term $T$ is quadratic in generalized velocities $\dot{\bf u}$;
(ii) that the potential term $U$ is independent of the generalized velocities $\dot{\bf u}$; and
(iii) that the Lagrangian $L=T-U$ does not depend explicitly on time.
Case without holonomic constraints. The energy $h=\dot{\bf u}\cdot \frac{\partial L}{\partial \dot{\bf u}}-L=T+U$ is conserved because the Lagrangian $L=T-U$ does not depend explicitly on time, cf. e.g this Phys.SE post.
Case with holonomic constraints $G({\bf u})\approx 0$ without explicit time dependence.
(i) Either we can formally eliminate variables such that there are no holonomic constraints left; or
(ii) Alternativelyalternatively, we can impose the constraints by introducingintroduce Lagrange multipliers, which we add to the list of variables ${\bf u}$, and add terms of the form 'Lagrange multiplier times $G$' to the potential term $U$. (The notion of potential energy will be unaltered on-shell.)
In both cases, the form 1 is maintained, and we can apply the conclusion from section 2: Energy is still conserved.