Suppose the a system has a Hamiltonian $H = H(q,p)$, and suppose $H$ does not depend explicitly on time. If $H\neq E$ the total energy of the system, does this necessarily say that $E$ is not conserved? Why?
I think you have a logical contradiction in your question. When H is independent of time, then H=E.
Please refer to this previous answer. When is the Hamiltonian of a system not equal to its total energy?