We report on our investigation on the magnetism of the iridate double perovskite Sr$_2$CoIrO$_6$, a nominally Ir$^{5+}$ Van Vleck $J_{eff}=0$ system. Using x-ray absorption (XAS) and x-ray magnetic circular dichroism (XMCD) spectroscopy at the Ir-$L_{2,3}$ edges, we found a nearly zero orbital contribution to the magnetic moment and thus an apparent breakdown of the $J_{eff}=0$ ground state. By carrying out also XAS and XMCD experiments at the Co-$L_{2,3}$ edges and by performing detailed full atomic multiplet calculations to simulate all spectra, we discovered that the compound consists of about 90% Ir$^{5+}$ ($J_{eff}=0$) and Co$^{3+}$ ($S=2$) and 10% Ir$^{6+}$ ($S=3/2$) and Co$^{2+}$ ($S=3/2$). The magnetic signal of this minority Ir$^{6+}$ component is almost equally strong as that of the main Ir$^{5+}$ component. We infer that there is a competition between the Ir$^{5+}$-Co$^{3+}$ and the Ir$^{6+}$-Co$^{2+}$ configurations in this stoichiometric compound.