Reason for the differences in third ionisation energy between elements (magnesium and fluorine)

The question is "Why is the third ionisation energy of magnesium higher than that of fluorine?"

Although I understand that differences in ionisation energy have several factors governing it, e.g. the shielding effect, distance from the nucleus, whether the electron is in its own orbital or paired with another electron etc.

The answer to this question is that "Even though the valence electrons of both elements are removed from the same shell, Mg has greater nuclear charge."

I am confused what the answer means about nuclear charge. Doesn't the third ionisation energy of Mg and F have the same nuclear charge as they are both 3+?

$$\mathrm{IE} \propto \left(\frac{Z_\mathrm{eff}}{n}\right)^2$$
In the ionisation of $\ce{Mg^2+}$ and $\ce{F^2+}$, both electrons are being ionised from the second principal quantum shell, so $n = 2$ in both cases. However, the main reason why the 3rd IE of magnesium is larger is because the nuclear charge $Z$ is larger, and not because of any so-called stability of half-filled or fully filled shells.
Contrary to what you thought, the nuclear charge is not the charge on the species. It is the charge of the nucleus - hence "nuclear charge". The $\ce{Mg}$ nucleus has 12 protons, and the $\ce{F}$ nucleus has 9 protons. So, there is a greater electrostatic force pulling the electron towards the nucleus in $\ce{Mg^2+}$ than in $\ce{F^2+}$, and consequently it is harder to remove the electron from $\ce{Mg^2+}$.
In truth, the raw nuclear charge must be modified by the shielding constant $\sigma$ to obtain the effective nuclear charge, $Z_\mathrm{eff}$. However, the variation in $\sigma$ between the two compounds is really negligible compared to the variation in the actual nuclear charge.