The competition between the quenching of pairing due to the repulsive Coulomb interaction and dynamic pairing correlations added by particle number symmetry restoration has been studied in a selected set of Fermium and Nobelium isotopes by using a hierarchy of Hartree-Fock-Bogoliubov--based approximations and a restricted variation after particle number projection, all of them based on the $\mathrm{D}1{\mathrm{M}}^{*}$ parametrization of the Gogny force. It is found that Coulomb antipairing is partially compensated by beyond-mean-field pairing correlations. However, the compensation is not perfect and a modulation of the spontaneous fission half-lives, as functions of the neutron number, indicates that the combined effect on fission dynamics of Coulomb antipairing and restricted particle number symmetry restoration cannot be overlooked. Neither can it be accounted for by the Coulomb Slater approximation.