Answer
Please see the work below.
Work Step by Step
We know that we have to balance the forces along the radial direction
$N+mgcos(\phi)=\frac{mv^2}{r}$
When the contact is lost then the normal force becomes zero, that is
$N=0$
$mgcos(\phi)=\frac{mv^2}{r}$
$cos{\phi}=\frac{v^2}{rg}$