When an ideal gas expands isothermally into a vacuum, $p_{ext} = 0$, so work done $w = 0$. Because the internal energy of an ideal gas depends only on temperature and $\Delta T = 0$, we have $\Delta U = 0$, and from the first law $q = 0$ as well. Consequently $\Delta H = \Delta U + nR\Delta T = 0$.