  The interplay of superconductivity with electronic and structural
instabilities on the kagome lattice provides a fertile ground for the emergence
of unusual phenomena. The vanadium-based kagome metals $A$V$_3$Sb$_5$ ($A=$ K,
Rb, Cs) exhibit superconductivity on an almost ideal kagome lattice, with the
superconducting transition temperature $T_{\rm c}$ forming two domes upon
pressure-tuning. The first dome arises from the competition between
superconductivity and a charge-density-wave, whereas the origin for the second
dome remains unclear. Herein, we show that the appearance of the second
superconducting dome in KV$_3$Sb$_5$ and RbV$_3$Sb$_5$ is associated with
transitions from hexagonal $P6$/$mmm$ to monoclinic $P2$/$m$ structures,
evidenced by splitting of structural peaks from synchrotron powder X-ray
diffraction experiments and imaginary phonon frequencies in first-principles
calculations. In KV$_3$Sb$_5$, transition to an orthorhombic $Pmmm$ structure
is further observed for pressure $p\gtrsim20$ GPa, and is correlated with the
strong suppression of $T_{\rm c}$ in the second superconducting dome. Our
findings indicate distortions of the crystal structure modulates
superconductivity in $A$V$_3$Sb$_5$ under pressure, providing a platform to
study the emergence of superconductivity in the presence of multiple structural
instabilities.
