No, even restricting to domains: it doesn't even commute to infinite powers.
Indeed, let $A$ be a non-perfect domain. So $A_{\mathrm{pf}}$ is an overring of $A$, such that for every $x\in A_{\mathrm{pf}}$ there exists some minimal $n=N(x)\ge 0$ such that $x^{p^n}\in A$. Then $x\mapsto N(x)$ is surjective onto non-negative integers. Choose $x_n\in A_{\mathrm{pf}}$ with $N(x_n)=n$. Then the sequence $(x_n)$, viewed as element of $(A_{\mathrm{pf}})^\mathbf{N}$ has no $p$-power power in $A^\mathbf{N}$. Thus, in this case we see that $(A^\mathbf{N})_{\mathrm{pf}}$ is a proper subring of $(A_{\mathrm{pf}})^\mathbf{N}$.
Note: $A_{\mathrm{pf}}$ is the initial object in the category of unital commutative rings (of characteristic $p$), endowed with a homomorphism from $A$, and in which $x\mapsto x^p$ is bijective. In particular there's a canonical homomorphism $\big(\prod_i A_i\big)_{\mathrm{pf}}\to \prod_i ((A_i)_{\mathrm{pf}})$. In the above example, it fails to be surjective. I haven't checked carefully but it seems to always be injective.
Edit: it's not always injective, even for infinite powers. Denote $\phi=\phi_A:A\to A$, $x\mapsto x^p$ (for $A$ commutative ring of characteristic $p$). First observe that the kernel of $A\to A_{\mathrm{pf}}$ is $\bigcup_n\mathrm{Ker}(\phi_A^n)$ (indeed, one directly check that for $B=A/\bigcup_n\mathrm{Ker}(\phi_A^n)$, we have $\phi_B$ injective).
Let $A$ be such that $\phi:x\mapsto x^p$ has nontrivial kernel. Hence for every $n\ge 0$ there exists $x_n$ in $A$ such that $x_n\in\mathrm{Ker}(\phi^{n+1})\smallsetminus\mathrm{Ker}(\phi^{n})$. Then $(x_n)_{n\ge 0}$ is an element of $A^\mathbf{N}$ inducing a nonzero element in the kernel of $(A^\mathbf{N})_{\mathrm{pf}}\to (A_{\mathrm{pf}})^\mathbf{N}$.
Note however that if each $A_i$ is reduced (i.e., has injective $\phi_{A_i}$), then $\big(\prod_i A_i\big)_{\mathrm{pf}}\to \prod_i ((A_i)_{\mathrm{pf}})$ is injective.