$D_{8n}$ has an element of order $4n$, but the maximal order of an element in $D_{4n} \times \mathbb{Z}_2$ is $2n$.