Determine all pairs $(a, p)$ of positive integers with $p$ prime such that $p^{a}+a^{4}$ is a perfect square. Please provide the sum of all elements in these pairs.

Let's think step by step and output the final answer within \boxed{}.
user