This works with $K$ any field with $\#M \in K^{\times}$; local fields (of characteristic 0) play no special role. The key points are (i) to re-interpret certain Hom-constructions as "sheaf Hom" in a way that is not noticed for finite $M$ but makes a big difference for general discrete $G_K$-modules, (ii) "derive" in the role of $K_s^{\times}$ (not $M$!). This will all become quite familiar when we express matters in the more robust geometric language of abelian etale sheaves rather than the more concrete language of discrete Galois modules.

For any discrete $G_K$-module $M$ with associated abelian etale sheaf $F_M$ on ${\rm{Spec}}(K)$, let $H(M)$ be the discrete $G_K$-module corresponding to the abelian etale sheaf $\mathscr{H}om(F_M, \mathbf{G}_m)$; in other words, $H(M) = \varinjlim {\rm{Hom}}_{G_{K'}}(M, K_s^{\times})$, which is to say $H(M)$ is the maximal discrete $G_K$-submodule of ${\rm{Hom}}_{\rm{Ab}}(M, K_s^{\times})$ (i.e., the subset of elements invariant by some open subgroup of $G_K$).

Note that if $M$ is *finite*, or more generally has trivial action by some open subgroup of $G_K$ (in other words, $F_M$ is "locally constant" as an abelian etale sheaf) then $H(M) = {\rm{Hom}}_{\rm{Ab}}(M, K_s^{\times}) =: \widehat{M}$ (in particular, $\widehat{M}$ is *discrete* as a $G_K$-module), but this is not true in general. It is $H(M)$ rather than $\widehat{M}$ that is the appropriate notion to consider on general discrete $G_K$-modules for the purpose of making and studying spectral sequences.

For arbitrary discrete $G_K$-modules $M$ we have
$${\rm{Hom}}_{G_K}(M, K_s^{\times}) = H(M)^{G_K}.$$
(This expresses that global-Hom between abelian etale sheaves coincides with global sections of sheaf-Hom.) The idea is that the right side is set up to fit into a Grothendieck-Leray spectral sequence for composite functors when we **derive in the 2nd variable** of $\mathscr{H}om$ (and not the first). Note that it would be ill-advised to replace $H(M)$ with $\widehat{M}$ away from the case of "locally constant" $F_M$ (such as for finite $M$) since in general $\widehat{M}$ is not a discrete $G_K$-module but ${\rm{H}}^{\bullet}(G_K, \cdot)$ is a derived functor only on the category of discrete $G_K$-modules.

Now we consider $M$ as fixed and "derive" in the role of $\overline{K}^{\times}$. In sheaf language,
$${\rm{Hom}}(F_M, \mathbf{G}_m) = \Gamma(K, \mathscr{H}om(F_M, \mathbf{G}_m))$$
with $\mathscr{H}om(F_M, \cdot)$ carrying injectives to "flabby" sheaves (see 1.23 in Ch. III of Milne's book on etale cohomology), which in turn are acyclic for etale cohomology. Thus, as for any scheme at all, we have a local-global spectral sequence for Ext's (see 1.22 in Ch. III of Milne's book)
$${\rm{H}}^p(G_K, \mathscr{E}xt^q(F_M, \mathbf{G}_m)) \Rightarrow
{\rm{Ext}}^{p+q}_{G_K}(M, K_s^{\times}).$$

*Now* we bring in the hypothesis that $M$ is finite with $\#M \in K^{\times}$. In such cases, we claim that $\mathscr{E}xt^q(F_M, \mathbf{G}_m) = 0$ for $q>0$, so then the spectral sequence for such $M$ degenerates to give isomorphisms
$${\rm{H}}^n(G_K, H(M)) \simeq {\rm{Ext}}^n_{G_K}(M, K_s^{\times})$$
with $H(M) = \widehat{M}$ since $M$ is finite.

To prove this higher $\mathscr{E}xt$-vanishing for such $M$, we note that it is harmless to work over an etale cover of ${\rm{Spec}}(K)$, so we can replace $K$ with a finite separable extension to arrange that $M$ has trivial $G_K$-action. Then $M$ is a finite direct sum of cyclic groups with trivial $G_K$-action, so we may assume $M = \mathbf{Z}/(N)$ for some $N>0$ that is nonzero in $K$. Thus, it suffices to show $\mathscr{E}xt^n(\mathbf{Z}/(N), \mathbf{G}_m)=0$ for all $n>0$ when $N$ is not divisible by ${\rm{char}}(K)$.
Via the exact sequence of constant sheaves
$$0 \rightarrow \mathbf{Z} \stackrel{N}{\rightarrow} \mathbf{Z} \rightarrow \mathbf{Z}/(N) \rightarrow 0$$
this in turn reduces to the vanishing of $\mathscr{E}xt^n(\mathbf{Z},\cdot)$ for $n>0$ and the surjectivity of $N$th power on $K_s^{\times}$. The latter is clear since $N$ is not divisible by ${\rm{char}}(K)$, and the vanishing is obvious since it is the derived functor of the left-exact functor $\mathscr{H}om(\mathbf{Z},\cdot)$ that is just the (exact) identity functor by another name.