In the exactly identified case, it is natural to assume that a unique $\theta$ satisfies $\bar{g}(\theta) = 0$, because the number of parameters is equal to the number of equations. Let $\hat\theta$ denote such $\theta$ value.
When $W$ is positive definite, $\bar{g}(\theta)' W \bar{g}(\theta) \ge 0$ (because $W$ is positive definite), and $\bar{g}(\theta)' W \bar{g}(\theta)$ attains zero if and only if $\bar{g}(\theta)=0$. That is, the global minimizer of $\bar{g}(\theta)' W \bar{g}(\theta)$ equals the solution to $\bar{g}(\theta)=0$, which is $\hat\theta$, for whatever positive definite $W$ matrix. Thus, $W$ is irrelevant.
Note that this argument does not hold if $W$ is not positive definite. For example, if $W$ is positive semi-definite but not positive definite, then the GMM estimator may not be unique.