  Neutrinoless double beta decay, if detected, would prove that neutrinos are
Majorana fermions and provide the direct evidence for lepton number violation.
If such decay would exist in nature, then $\pi^-\pi^-\to ee$ and $\pi^-\to\pi^+
ee$ (or equivalently $\pi^-e^+\to\pi^+ e^-$) are the two simplest processes
accessible via first-principle lattice QCD calculations. In this work, we
calculate the long-distance contributions to the $\pi^-\to\pi^+ee$ transition
amplitude using four ensembles at the physical pion mass with various volumes
and lattice spacings. We adopt the infinite-volume reconstruction method to
control the finite-volume effects arising from the (almost) massless neutrino.
Providing the lattice QCD inputs for chiral perturbation theory, we obtain the
low energy constant
$g_\nu^{\pi\pi}(m_\rho)=-10.89(28)_\text{stat}(74)_\text{sys}$, which is close
to $g_\nu^{\pi\pi}(m_\rho)=-11.96(31)_\text{stat}$ determined from the
crossed-channel $\pi^-\pi^-\to ee$ decay.
