For cos(2θ) qubits based on voltage-controlled semiconductor nanowire Josephson junctions we introduce a single-qubit Z gate inspired by the noise-bias preserving gate of the Kerr-cat qubit. This scheme relies on a π rotation in phase space via a beamsplitter-like transformation between a qubit and ancilla qubit. The rotation is implemented by adiabatically changing the potential energies of the two qubits such as to preserve a double-well potential at all times. This gate constrains the dynamics in the subspace of a cos(2θ) qubit at all times, therefore yielding high-fidelity operation while preserving the qubit's coherence. We introduce a circuit to realize this gate and support our findings with numerical simulations.