Your assumption works if the minimum velocity at the top needed was indeed 0. Then you can equate that all kinetic energy is converted to gravitational potential energy so $v=\sqrt{2gh}$.
But, here the roller coaster to complete circular motion, it must have some non-zero horizontal velocity at the top of the loop, or it would simply fall down. Hence that velocity is found using the velocity for centripetal acceleration provided that the centripetal force is as low as possible which will yield the lowest velocity needed and that is the case when the downward(centripetal) force is just gravity or $mg$. This thus results that the minimum velocity is found from: $$mg=mv^2/r$$
If you backward calculate this you can indeed find the minimum initial kinetic energy the roller coaster must have. But there is no way to satisfy the circular motion priority with invoking just energy conservation.
Notice that for $v=\sqrt{2gh}$. is for the velocity from the ground when considering vertical straight motion while the velocity of $v=\sqrt{gr}$ is for the top of the loop for circular motion. To find the minimum velocity needed at the bottom/ground of the loop for circular motion would be by the following setting initial kinetic energy to top’s GPE and Kinetic energy due to top’s minimum velocity:
$$1/2mu^2=2mgr+1/2(\sqrt{gr})^2$$
$$u^2=5gr$$
$$u=\sqrt{5gr}$$
So hence you see $u$ is indeed greater for circular motion.