$$\sec2\theta=\csc2\theta$$
My attempt:
$$\begin{align} \cos2\theta &= \sin2\theta \tag{1}\\ \cos^2\theta+\sin^2\theta-2\cos\theta\sin\theta &=0 \tag{2}\\ (\cos\theta-\sin\theta)^2 &=0 \tag{3}\\ \cos\theta-\sin\theta &=0 \tag{4}\\ \cos\theta &=\sin\theta \tag{5}\\ \tan\theta &=1 \tag{6}\\ \theta &=180^\circ n+45^\circ \quad\text{??} \tag{7} \end{align}$$
But the answer was $90^\circ n+22.5^\circ$ and I'm not sure why. I've searched up the question online, and someone has proposed a solution where it is not factored; instead, the equation turns into $\tan2\theta=1$ on line $(2)$, and this allows you to get the correct solution.
What's wrong with factoring it though?