We may construct a system with Hamiltonian not $T+V$ but energy still conserved from any system where energy is conserved by making the phase space description generally covaraint:
Starting from an unconstrained Hamiltonian $H_0(p,q)$ with Hamiltonian action
$$ S_0 = \int \left(p_i \frac{\mathrm{d}q^i}{\mathrm{d}t} - H_0(p,q)\right)\mathrm{d}t$$
we may turn it into a constrained system by making $q^0 = t$ a phase space variable with the constraint $p_0 = -H_0$ with action
$$ S_\text{cov} = \int \left(p_0 \dot{q}^0 + p_i \dot{q}^i - u^0 (p_0 + H_0)\right)\mathrm{d}\tau$$
where $u^0$ is a Lagrange multiplier enforcing the constraint and the dot is the derivative with respect to $\tau$. Equivalence of the two actions may be seen by getting the e.o.m. for $S_\text{cov}$ and plugging in.
Inspecting the action $S_\text{cov}$, we further see that it has zero Hamiltonian! All that's in there are the canonical pairs $p_i \dot{q}^i$ and a constraint.1 So the Hamiltonian of the covariant description is certainly not $T+V$! Nevertheless, if the system we started with had conservation of energy in the sense of $T+V$, then so will the covariant system, since both are equivalent.
The above highlights an important point: While the Hamiltonian is often referred to as "energy", it need not have any physical meaning. In particular, whenever constraints arise (and constraints arise, for example, when we have a gauge theory on the level of the Lagrangian), its meaning must be carefully considered. Also, the form of the Hamiltonian can be changed by changing our description of the system (mainly enlarging the phase space (introducing gauge symmetries/constraints) and reducing the phase space (eliminating constraints)), and thus "the Hamiltonian" is not an invariant of any physical system.
Additionally, you speak of cases where the "Hamiltonian is conserved". Some remarks to that: In the Hamiltonian formalism, being conserved means having zero Poisson bracket with the Hamiltonian, since it is the generator of "time" translation (whether the evolution parameter is physical time or not), so the Hamiltonian is trivially conserved. In the covariant formalism, $p_0$ is the generator of time translations, but the Hamiltonian is zero, and so also conserved, since its Poisson bracket with $p_0$ is obviously zero.
1Up to here, this discussion is quite faithfully taken from Ch. 4.2 of "Quantization of Gauge Systems" by Henneaux/Teitelboim.