By the Lorentz guage $\displaystyle \nabla \cdot \mathbf A = -\frac{1}{c^2}\partial_t \varphi\ $ one gets the inhomogeneous wave equations for the potentials $$ \square^2 \varphi = -\frac{1}{\epsilon_0}\rho, \qquad \square^2 \mathbf A = -\mu_0\mathbf J \tag{I} $$ where $\displaystyle \square^2 \equiv \nabla^2 - \frac{1}{c^2}\partial^2_t\ $. The solution are (the retarded potentials) $$ \varphi = \frac{1}{4\pi\varepsilon_0}\int\frac{\rho(\mathbf r',t_r)}{\ell}d\tau', \qquad \mathbf A = \frac{\mu_0}{4\pi}\int\frac{\mathbf J(\mathbf r',t_r)}{\ell}d\tau' $$ where $$\ell = |\boldsymbol{\ell}|, \quad \boldsymbol{\ell} = \mathbf {r - r'}, \quad \boldsymbol{\hat \ell} = \frac{\boldsymbol{\ell}}{\ell}, \quad \displaystyle t_r = t - \frac{\ell}{c} $$ Maxwell's equations can be decoupled for $\mathbf E$ and $\mathbf B$ to get the two equations $$ \square^2 \mathbf E = \frac{1}{\epsilon_0}\nabla\rho + \mu_0\partial_t\mathbf J,\qquad \square^2 \mathbf B = -\mu_0\nabla\times \mathbf J \tag{II} $$ Now these two equtions are similar to the that of $\mathbf A$, with the $-\mu_0 \mathbf J$ in (I) replaced by $\frac{1}{\epsilon_0}\nabla\rho + \mu_0\partial_t\mathbf J$ and $-\mu_0\nabla\times \mathbf J$ in (II) respectively. So I think that it is possible to solve (II) by a retartded potential solution as for the case of (I).
If one attempts a retarded potential solution for $\mathbf B$ one gets $$ \mathbf B(\mathbf r,t) = \frac{\mu_0}{4\pi} \int\left[ \frac{\nabla'_1\times \mathbf J(\mathbf r',t_r)}{\ell} \right]\, d\tau' \tag{*} $$ where $\displaystyle \nabla'_1$ denotes the differentiation wrt the first argument in $\mathbf J(\mathbf r',t_r)$ only, (as it should, right ?)
On the other hand, I expect the solution to be the Jefimenko's equation for magnetic field (as in Griffiths) $$ \mathbf B(\mathbf r,t) = \frac{\mu_0}{4\pi} \int\left[ \frac{\mathbf J(\mathbf r',t_r)}{\ell^2} + \frac{\mathbf{ \dot{ J}}(\mathbf r',t_r)}{c\ell} \right] \times \boldsymbol{\hat{\ell}}\, d\tau' \tag{**} $$ but it doesn't seem that these two solutions are the same, not even in the static case!
So why solving $$ \square^2 \mathbf A = -\mu_0\mathbf J \tag{I} $$ with retarded potential is correct but solving the similar equation (i.e. of the same mathematical form) $$ \square^2 \mathbf B = -\mu_0\nabla\times \mathbf J \tag{II} $$ is not correct ?