6. As shown in Figure 2, square $ABCD$ is inscribed in $\odot O$, $P$ is a point on the minor arc $\overparen{CD}$, $PA$ intersects $BD$ at point $M$, $PB$ intersects $AC$ at point $N$, and let $\angle PAC = \theta$. If $MN \perp PA$, then the value of $2 \cos^2 \theta - \tan \theta$ is ( ).
(A) 1
(B) $\frac{\sqrt{2}}{2}$
(C) $\frac{1}{2}$
(D) $\frac{\sqrt{2}}{4}$
6. A.

Let the radius of $\odot O$ be 1, then $A C=2$.
As shown in Figure 2, connect $P C$. Then $\angle A P C=90^{\circ}$. Therefore, $P A=A C \cos \theta=2 \cos \theta$.
In the right triangle $\triangle A O M$, $A M=\frac{O A}{\cos \theta}=\frac{1}{\cos \theta}$;
In the right triangle $\triangle A M N$, $M N=A M \tan \theta=\frac{\tan \theta}{\cos \theta}$;
In the right triangle $\triangle P M N$, since
$\angle M P N=\angle A P B=\angle A D B=45^{\circ}$,
it follows that $P M=M N=\frac{\tan \theta}{\cos \theta}$.
Also, $A M+P M=P A$, so $\frac{1}{\cos \theta}+\frac{\tan \theta}{\cos \theta}=2 \cos \theta$.
Thus, $2 \cos ^{2} \theta-\tan \theta=1$.