Derivation of the conversion of Gaussian type orbitals (in cartesian coordinates) to Gaussian type orbitals (in polar coordinates)

While studying basis sets, I came across Gaussian type orbitals (GTOs), which are used as atomic basis sets. I reviewed the polar form of these orbitals, which are very similar to hydrogen atom orbitals. I then looked at the Cartesian form of the same orbitals and tried to derive the polar form from the Cartesian form using simple polar substitutions.


\begin{align}
x &= r\cos(\theta)\sin(\phi);\\ 
y &= r\sin(\theta)\sin(\phi);\\ 
z &= r\cos(\theta)
\end{align}


To my surprise, I was unable to get the same polar expression. Both the polar and Cartesian forms of the GTO are attached for reference. Would someone who has worked on this derivation be willing to share it? It would be very helpful.


\begin{align}
\text{Cartesian form: }&&
G\_{\ell,m,\alpha}(\mathbf{r}) &= N\_{\ell,m} x^{\ell\_x} y^{\ell\_y} z^{\ell\_z} e^{-\alpha r^2} \\
\text{polar form: }&&
 G\_{\ell,m,\alpha}(\mathbf{r}) &= N\_{\ell,m} r^{\ell} e^{-\alpha r^2} Y\_{\ell,m}(\theta,\phi)
\end{align}


