Quantum Zeno and anti-Zeno effect on a two-qubit gate by dynamical decoupling