The problem here is that $\cos (\theta) d\phi$ is not a $1$-form on all of $S^2$.
Imagine the simpler example of the circle $S^1$ with coordinate $\theta$. We often write the standard 1-form as $d\theta$, however this it is not exact since $\theta$ is not a function. Every point $x\in S^1$ is "mapped" by $\theta$ to countable many values $x+2\pi n$. The notation, although standard, is misleading in this case.
What happends with $\cos \theta d\phi$ is that it is not defined at the poles. We can see this from writing it in cartesian coordinates as
$$\cos \theta d\phi = z \frac{xdy-ydx}{x^2+y^2}$$.
Note however that the original 2-form is since both $d\theta$ and
$$\sin \theta d\phi = \sqrt{x^2+y^2}\frac{xdy-ydx}{x^2+y^2} =\frac{xdy-ydx}{\sqrt{x^2+y^2}} $$
are defined everywhere.