Algebraic foliations and derived geometry: the Riemann–Hilbert correspondence