Generally
\begin{align}
&\texttt{The 4-gradient contravariant vector operator}
\nonumber\\
& \qquad \qquad \qquad \partial^{\mu}\boldsymbol{\equiv}\dfrac{\partial }{\partial x_{\mu}}\boldsymbol{=}\left(\dfrac{\partial }{\partial x^{0}}\,,\boldsymbol{-\nabla}\right)
\tag{01a}\label{01a}\\
&\texttt{The 4-gradient covariant vector operator}
\nonumber\\
&\qquad \qquad \qquad \partial_{\mu}\boldsymbol{\equiv}\dfrac{\partial }{\partial x^{\mu}}\boldsymbol{=}\left(\dfrac{\partial }{\partial x^{0}}\,,\boldsymbol{+\nabla}\right)
\tag{01b}\label{01b}
\end{align}
The 4-divergence of a 4-vector $A^{\mu}\boldsymbol{=}\left(A^{0},\mathbf{A}\right),A_{\mu}\boldsymbol{=}\left(A^{0},\boldsymbol{-}\mathbf{A}\right) $ is the invariant
\begin{equation}
\partial^{\mu}A_{\mu}\boldsymbol{=}\partial_{\mu}A^{\mu}\boldsymbol{=}\dfrac{\partial A^{0} }{\partial x^{0}}\boldsymbol{+\nabla\cdot}\mathbf{A}
\tag{02}\label{02}
\end{equation}
$=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=\!=$
Note : May be in the future you ask yourself if the converse of \eqref{02} is true. No, it's not : if $A^{\mu}\boldsymbol{=}\left(A^{0},\mathbf{A}\right)$ is a 4-dimensional quantity then
\begin{equation}
\partial_{\mu}A^{\mu}\boldsymbol{=}\texttt{invariant}\quad \boldsymbol{=\!\ne\!\Rightarrow}\quad A^{\mu}\boldsymbol{=}\texttt{contravariant Lorentz 4-vector}
\tag{03}\label{03}
\end{equation}
$-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!-\!\!$
Counter example
Consider that $Y^{\mu}\left(\mathbf{x},t\right)\boldsymbol{=}\left[\!\!\left[ Y^{0}\left(\mathbf{x},t\right),\mathbf{Y}\left(\mathbf{x},t\right)\right]\!\!\right]$ is a (contravariant) 4-vector function of the space-time coordinates $\left(\mathbf{x},t\right)$. According to equation \eqref{02} its 4-divergence is invariant
\begin{equation}
\partial_{\mu}Y^{\mu}\boldsymbol{=}\dfrac{\partial Y^{0} }{\partial x^{0}}\boldsymbol{+\nabla\cdot}\mathbf{Y}\boldsymbol{=}\texttt{invariant}
\tag{04}\label{04}
\end{equation}
Now consider a 4-dimensional vector $\rm a^{\mu}\boldsymbol{=}\left(a^{0},\mathbf{a}\right)\boldsymbol{=}\left(a^{0},a^{1},a^{2},a^{3}\right)$ with components 4 arbitrary real numbers constants, that is not depending on the space-time coordinates $\left(\mathbf{x},t\right)$ and form the 4-dimensional vector
\begin{equation}
A^{\mu}\boldsymbol{=}Y^{\mu}\boldsymbol{+}\rm a^{\mu}
\tag{05}\label{05}
\end{equation}
Then
\begin{equation}
\partial_{\mu}A^{\mu}\boldsymbol{=}\partial_{\mu}Y^{\mu}\boldsymbol{+}\overbrace{\partial_{\mu}\rm a^{\mu}}^{0}\boldsymbol{=}\partial_{\mu}Y^{\mu}\boldsymbol{=}\texttt{invariant}
\tag{06}\label{06}
\end{equation}
But $A^{\mu}$ as defined by equation \eqref{05} in not a 4-vector due mainly to the arbitrariness of $\rm a^{\mu}$.