Next-generation plasma-based accelerators can push electron bunches to gigaelectronvolt energies within centimetre distances1,2. The plasma, excited by a driver pulse, generates large electric fields that efficiently accelerate trailing witness bunch3–5, enabling the realization of laboratory-scale applications ranging from high-energy colliders6 ultrabright light sources7. So far, several expe...