Robustness of quantum gates with hybrid spin-photon qubits in superconducting resonators