In the LaTeX document shown below, my definition `\comp` does not show correctly in the align environment. Why it is this the case?

========== Begin LaTeX scripts =============

```
\documentclass[12pt,reqno, oneside]{amsart}
%
{\catcode`\,=13 \gdef,{\mskip 5mu}} % 5 mu is the space between parts
\def\comp{\bgroup\catcode`\,=13\relax\compx}
\def\compx(#1){#1\egroup}
%
\begin{document}
The desired effect of ``comp'' is
$$\text{The natural numbers are }\comp(1, 2, 3, 4, \dots).$$

However, in the align environment it becomes the following, with annoying commas in between the numbers:
\begin{align*}
\text{The natural numbers are }&\comp(1, 2, 3, 4, \dots).
\end{align*}
\end{document}

```