Motived by recent ground-based and microgravity experiments investigating the interfacial dynamics of a volatile liquid (FC-72, $Pr=12.34$) contained in a heated cylindrical cell, we numerically study the thermocapillary-driven flow in such an evaporating liquid layer. Particular attention is given to the prediction of the transition of the axisymmetric flow to fully three-dimensional patterns when the applied temperature increases. The numerical simulations rely on an improved one-sided model of evaporation by including heat and mass transfer through the gas phase via the heat transfer Biot number and the evaporative Biot number. We present the axisymmetric flow characteristics, show the variation of the transition points with these Biot numbers, and more importantly elucidate the twofold role of the latent heat of evaporation in the stability; evaporation not only destabilizes the flow but also stabilizes it, depending upon the place where the evaporation-induced thermal gradients come into play. We also show that buoyancy in the liquid layer has a stabilizing effect, though its effect is insignificant. At high Marangoni numbers, the numerical simulations revealed smaller-scale thermal patterns formed on the surface of a thinner evaporating layer, in qualitative agreement with experimental observations. The present work helps to gain a better understanding of the role of a phase change in the thermocapillary instability of an evaporating liquid layer.