Initially, just before release, the system has potential energy $U$:
$$T=U=mgL$$
As the string hits the horizontal bar, it enters into a different 'orbit', this one with radius $L-H$. At the highest point of this loop, the mass is at height $2(L-H)$. Assuming full conservation of energy, then the new total energy is:
$$T=2mg(H-L)+K$$$$T=2mg(L-H)+K$$
Where $K$ is the kinetic energy at the top of the loop. So:
$$mgL=2mg(H-L)+K$$$$mgL=2mg(L-H)+K$$ So that:
$$K=mg(3L-2H)$$$$K=mg(2H-L)$$
With $v$ the tangential velocity at the top of the loop:
$$K=\frac12 mv^2=mg(3L-2H)$$$$K=\frac12 mv^2=mg(2H-L)$$
So:
$$v^2=2g(3L-2H)$$$$v^2=2g(2H-L)$$
The centripetal force $F_c$ is:
$$F_c=\frac{mv^2}{R}=\frac{mv^2}{L-H}$$
For there not to tension in the string at the top of the loop:
$$mg=\frac{mv^2}{L-H}$$
$$g=\frac{2g(3L-2H)}{L-H}$$$$g=\frac{2g(2H-L)}{L-H}$$
So I get:
$$L-H=2(3L-2H)$$$$L-H=2(2H-L)$$
$$H=\frac53 L$$$$H=\frac35 L$$