  The nonadiabatic dynamic of the electromagnetic field triggers photons
generation from the quantum vacuum. Shortcuts to adiabaticity, instead, are
protocols that mimic the field's adiabatic dynamic in a finite time. Here, we
show how the counterdiabatic term of the transitionless tracking algorithm
cancels out, exactly, the term responsible for the photon production in the
dynamical Casimir effect. This result suggests that the energy of producing
photons out of the vacuum is related to the energetic cost of the shortcut.
Furthermore, if the system operates under a quantum thermodynamic cycle, we
confirm the equivalence between the adiabatic and nonadiabatic work outputs.
Finally, our study reveals that identifying these unreported observations can
only be possible using the so-called effective Hamiltonian approach.
