It is stated in many texts that the number operator $N$ which counts the number of Cooper pairs and the phase operator $\phi$ which counts the superconducting order parameter's phase $\text{Arg}(\Delta)=\phi$ are canonically conjugate and thus satisfy \begin{equation} N = -i\frac{\partial}{\partial \phi} \iff \phi = i\frac{\partial}{\partial N} \end{equation} This makes sense when one looks at the BCS ground state \begin{equation} |BCS\rangle = \prod_k (u_k+v_kc^\dagger_{k\uparrow}c^\dagger_{-k\downarrow})|0\rangle \end{equation} and since $u^*_kv_k=|u_k||v_k|e^{i\phi}$ this can be written as \begin{align} |BCS\rangle &= \prod_k (|u_k|+|v_k|e^{i\phi}c^\dagger_{k\uparrow}c^\dagger_{-k\downarrow})|0\rangle \end{align} up to some irrelevant global phase.
We see that every Cooper pair comes with a phase $e^{i\phi}$ so differentiating with respect to $\phi$ gives the same result as counting the number of Cooper pairs.
Due to this well-defined phase $\phi$, $|BCS \rangle$ is a coherent superposition of states with different particle number, and there does not have a well defined $N$. But now let's consider what happens when we project the BCS state on a the subspace with fixed particle number $N$ as explained in https://canvas.harvard.edu/courses/79258/files/folder/Problem%20Sets?preview=12301649. We find that \begin{equation} |BCS_N\rangle\equiv \int_0^{2\pi} \frac{d\phi}{2\pi} e^{-iN\phi} |BCS\rangle = C \bigg(\sum_k \frac{|v_k|}{|u_k|} c^\dagger_{k\uparrow}c^\dagger_{-k\downarrow}\bigg)^N |0\rangle \end{equation} which looks a lot like a BEC state formed by $N$ Cooper pairs. This state clearly has $N$ cooper pairs. However when I use the definition $N = -i\frac{\partial}{\partial \phi}$, since there is no $\phi$ dependence in this state (it got integrated out) I am expected to get $N=0$?!
So what's wrong with this reasoning?