If $A$ and $B$ are any two diagonalizable matrices that commute, then for any matrix function $f$ (anything in the continuous functional calculus, such as square root), $f(A)$ and $f(B)$ will also commute.
[EDIT (thanks to Danylo Y): More specifically,$f:\mathbb{C}\rightarrow\mathbb{C}$ should be continuous on the spectra of $A$ and $B$ for the continuous functional calculus to be well-defined. When you say "square root" it's highly ambiguous: Craig Gidney points out that matrix square roots are not unique (e.g. $A(\theta):=\cos(\theta)X+\sin(\theta)Z$ satisfies $A(\theta)^2=I$ for all $\theta$, so there are infinitely many "square roots" of $I$). Usually one thinks about square roots of positive matrices, for which there is a unique positive root. But for unitaries, that's not true. In fact the square root isn't continuous on the complex unit circle.
In my "intuitive" answer, continuity isn't necessary as long as you define $f(A)$ exactly as I describe in terms of its diagonalization. And for a function expressible as a power series, that's the same as the "general" answer. However, without knowing exactly how you've defined $\sqrt{A}$ and $\sqrt{B}$, then this might not apply.
A more accurate summary of the situation: For any two diagonalizable, commuting matrices $A$ and $B$, you can define matrices $\sqrt{A}$ and $\sqrt{B}$ such that $\sqrt{A}^2=A$ and $\sqrt{B}^2=B$, and $[\sqrt{A},\sqrt{B}]=0$. The proof is that every complex number has a square root, so you diagonalize and then pick a square root of each eigenvalue. But that's not what my original answer said; sorry for misleading!]
Intuitive answer: We can define $f(A)$ by first diagonalizing $A$ as $A=VDV^*$ for some unitary $V$ and diagonal matrix $D$. The function $f$ can be applied to the diagonal entries of $D$ (e.g.: square root), to produce $f(D)$; then we define $f(A)=Vf(D)V^*$.
If $A$ and $B$ commute, they can be simultaneously diagonalized, so $A=VD_AV^*$ and $B=VD_BV^*$. Diagonal matrices definitely commute, so $f(D_A)f(D_B)=f(D_B)f(D_A)$. Thus:
$$f(A)f(B) = Vf(D_A)V^*Vf(D_B)V^*=Vf(D_B)f(D_A)V^* = f(B)f(A)$$
(skipping steps to cancel and restore $V^*V=I$).
More general answer: If $A$ and $B$ commute, any powers of $A$ and $B$ commute (you can just commute each instance of $A$ and $B$ one at a time).
Moreover, if $A_1,\dots A_n$ each commute with every one of $B_1,\dots,B_n$, then any linear combination of $A_1,\dots, A_n$ commutes with any linear combination of $B_1,\dots, B_n$.
Combining those two facts, we get that any polynomial of $A$ will commute with any polynomial of $B$. Then any function with a power series representation [EDIT: on the spectrum on $A$ and $B$!] (square roots, logarithms, exponentials, trigonemetric) will also commute, as they can be found as the limit of a sequence of polynomials.