  The $S$-wave $DD^*$ scattering in the isospin $I=0,1$ channels is studied in
$N_f=2$ lattice QCD at $m_\pi\approx 350$ MeV. It is observed that the $DD^*$
interaction is repulsive in the $I=1$ channel when the $DD^*$ energy is near
the $DD^*$ threshold. In contrast, the $DD^*$ interaction in the $I=0$ channel
is definitely attractive in a wide range of the $DD^*$ energy. This is
consistent with the isospin assignment $I=0$ for $T_{cc}^+(3875)$. By analyzing
the components of the $DD^*$ correlation functions, it turns out that the quark
diagram responsible for the different properties of $I=0,1$ $DD^*$ interactions
can be understood as the charged $\rho$ meson exchange effect. This observation
provides direct information on the internal dynamics of $T_{cc}^+(3875)$.
