Synchronized spin-photon coupling in a microwave cavity