In the case of a K3 surface, the representability of $R^2 \pi_\ast \mu_p$ (for $p$ an arbitrary integer) is proven in the paper "[Twistor Spaces for Supersingular K3s](https://arxiv.org/abs/1804.07282)" by Daniel Bragg and Max Lieblich. What you want is Theorem 2.1.6: If $\pi : X \to S$ is a relative K3, then the fppf sheaf $R^2 \pi_\ast \mu_p$ is representable by a group algebraic space, locally of finite presentation over $S$.