Is this case a failure of Stokes' theorem? In the presence of a hypothetical magnetic point charge at the origin of coordinates, it turns out that an irremovable physical singularity of the vector potential ${\bf A}({\bf r})$ exists for any choice of ${\bf A}({\bf r})$, extending from the origin to infinity in a radially outward direction. This is called the Dirac string. Let us consider a particular choice of ${\bf A}({\bf r})$ such that the Dirac string lies along the positive $z$ axis. This choice is
$${\bf A}({\bf r}) = \frac{g}{r(r-z)}(y\hat{{ x}}-x\hat{{y}}),\nonumber\\
~~~~= -\frac{g(1+\cos\theta)}{r\sin\theta}\hat{{\phi}}.
$$ There is a genuine singularity at $\theta=0$ i.e. on the entirety of positive $z$-axis!
Now consider the following steps. First, consider a punctured sphere with its center at the origin and the punctured disc pierced by the positive $z$ axis such that the Dirac string passes through the disc. Next, consider a closed loop $C$ and along the circumference of the disc enclosing the Dirac string.
Is Stokes' theorem valid here? I recall from memory that Stokes' theorem is valid if both the surface and the loop enclosing surface are in a region where the vector field is free from singularities. In this particular situation, the loop $C$, as well as the curved surface of the sphere enclosed by the loop, lie in a singularity-free region of ${\bf A}({\bf r})$. However, if we consider the circular puncture enclosed by the loop, this disc not free from the singularity. Because it is pierced by the positive $z$-axis.
 A: In this kind of cohomology-related things, physicists tend to say that “Stokes theorem always holds,” while allowing the possibility of delta-function sources.
On the other hand, mathematicians normally exclude the delta-like sources from the domain of their spaces and say that “you cannot apply Stokes theorem when the ‘inner region’ (the inverse-boundary operation) of the submanifold of integration is not well-defined.“
Take a current $I$ flowing through an infinite line, for example.
The magnetic field is $(\mu_0 I/2\pi) (1/s)\hat{\phi}$.
Physicists say that Stokes’ theorem $\mu_0\int_\mathcal{S} \vec{J}\cdot d^2\vec{a} = \oint_{\partial\mathcal{S}} \vec{B}\cdot d\vec{l}$ holds perfectly well, as the current density is given by $\vec{J}(x,y,z) = I\delta(x)\delta(y) \hat{z}$.
But, mathematicians say that “you cannot call a loop enclosing the current line ‘$\partial\mathcal{S}$’!”
It is because, the surface $\mathcal{S}$ filling the loop “$\partial\mathcal{S}$” passes through the line, where the magnetic field diverges.
In mathematician’s standards, the “space” is not $\mathbb{R}^3$ but $\mathbb{R}^3\setminus\{x=0,y=0\}$, the current line being removed.
Then it has a nontrivial topology and a nontrivial cohomology class…
If we imagine $\mathcal{S}$ as a soap membrane, then it will “burst” when it touches the “spiky” delta-like $\nabla\times\vec{B}$, screaming like “ouch”!!
Your original question about magnetic monopole can be also understood in this way.
For physicists, applying the Stokes theorem is never a problem at all because they will always push their “black magic with delta distributions” to the end.
For instance see Nakahara’s “Geometry, Topology, and Physics” for the current density of the Dirac string: an infinitesimally thin half-infinite solenoid.
It is expressed in terms of Dirac delta and Heaviside step function.
On the other hand, mathematicians will say that the “space” is not the entire Euclidean space but $\mathbb{R}^3\setminus\{0\}$ so that you cannot call the Gauss surface enclosing the magnetic monopole “$\partial\mathcal{V}$” because there is no such thing as “$\mathcal{V}$” that can “survive” after passing through the spiky singularity at the origin.
They just exclude the origin from the domain of the magnetic field, because it blows up there.
(Note that physicists include the origin as the domain of the magnetic field and even write down equations like $\nabla\cdot\vec{B}=g\delta(x)\delta(y)\delta(z)$.)
Then they will work in the manner precisely you have described in your question: introducing Dirac string, coordinate patches, and so on.
A: The Stokes' theorem
$$
  \oint_{C(S)} \vec{A}(\vec{r}) \cdot d\vec{\ell} = \int\int_S \vec\nabla\times\vec{A}\cdot d\vec{S}.
$$
Therefore, any closed contour integral vanishes only when $\vec\nabla\times\vec{A} = 0$ (which then implys that the integral between two points will not depend on the path of integral).
In your case, the $\vec\nabla\times\vec{A}$ is:
$$
\vec\nabla\times\vec{A} = \frac{1}{r^2\sin\theta}
\left\vert
\begin{matrix}
\hat{r} & r\hat{\theta} & r\sin\theta\hat{\phi}\\
\frac{\partial}{\partial r} &\frac{\partial}{\partial \theta} &\frac{\partial}{\partial \phi} \\
0 & 0& r\sin\theta \frac{g(1+\cos\theta)}{r\sin\theta}
\end{matrix}
\right\vert
= \frac{1}{r^2\sin\theta} \hat{r}\frac{\partial}{\partial \theta} g(1+\cos\theta)
= -\hat{r}\frac{g}{r^2}
$$
The $\vec\nabla\times\vec{A} \ne 0$, therefore the integral between two points will be depended on path of integral.
