  The ODE/IM correspondence is an exact link between classical and quantum
integrable models. The primary purpose of this work is to show that it remains
valid after $\mathrm{T}\bar{\mathrm{T}}$ perturbation on both sides of the
correspondence. In particular, we prove that the deformed Lax pair of the
sinh-Gordon model, obtained from the unperturbed one through a dynamical change
of coordinates, leads to the same Burgers-type equation governing the quantum
spectral flow induced by $\mathrm{T}\bar{\mathrm{T}}$. Our main conclusions
have general validity, as the analysis may be easily adapted to all the known
ODE/IM examples involving integrable quantum field theories.
