Vapour bubbles produced by long-pulsed laser often have complex non-spherical shapes that reflect some characteristics of the laser beam. The transition between two commonly observed shapes, namely, a rounded pear-like shape and an elongated conical shape, is studied using a new computational model that combines compressible multiphase fluid dynamics with laser radiation and phase transition. Two laboratory experiments are simulated, in which a holmium:YAG or thulium fibre laser is used to generate bubbles of different shapes. In both cases, the predicted bubble nucleation and morphology agree reasonably well with the experimental observation. The full-field results of laser irradiance, temperature, velocity and pressure are analysed to explain bubble dynamics and energy transmission. It is found that due to the lasting energy input, the vapour bubble's dynamics is driven not only by advection, but also by the continued vaporisation at its surface. Vaporisation lasts less than $1~{\rm \mu}$s in the case of the pear-shaped bubble, compared with over $50~{\rm \mu}$s for the elongated bubble. It is thus hypothesised that the bubble's morphology is determined by competition. When the speed of advection is higher than that of vaporisation, the bubble tends to grow spherically. Otherwise, it elongates along the laser beam direction. To test this hypothesis, the two speeds are defined analytically using a model problem, then estimated for the experiments using simulation results. The results support the hypothesis. They also suggest that when the laser's power is fixed, a higher laser absorption coefficient and a narrower beam facilitate bubble elongation.