I just learned that the energy stored in a capacitor is electrostatic potential energy. Also potential energy is a state function and is independent of the path. So, when the capacitor is fully charged to $Q$ and a potential difference of $V$, the potential energy of the system would be $$Q(V_+)-Q(V_-) = Q(\Delta V) = U$$ where, $V_+$ is the potential of the positive plate and $V_-$ is the potential of the negatively charged plate.
This is how we calculate the potential energy of system of charges. Why does this reasoning fail in case of capacitors?