Delta hedging error in B-S (hedging with implied vol) question

I have been thinking about this for a while and am at my wits end. Now assume I am pricing a call at implied vol $$s$$, whereas the realized volatility is $$σ$$. Let $$C$$ be the incorrect pricing function.

Let me first write how this function is born. The hedged portfolio is:

$$dC-C_{S}dS=C_{t}dt+0.5C_{SS}s^2dt=r(C-SC_S)dt \tag 1$$

Now the solution to this ensures that the second equation equals the 3rd, but neither of them are equal to the first.

My problem is with understanding Ito's lemma for $$C$$, which writes:

$$dC(t,S(t,w))=C_tdt+C_SdS(t,w)+0.5C_{SS}S^{2}(t,w)σ^{2}dt \tag 2$$

This statement requires no financial argument and is true as soon as $$C$$ is a function of $$t$$, $$S_t$$.

The problem is that in theory, one generally uses (2) to calculate hedging error.

However, the trader uses the PDE solution formed from equation (1) to calculate the price tomorrow. That is just the Black Scholes price at the same implied vol, so the increment in the marked price is not consistent with (2). At least not in a way obvious to me.

So how does the hedging error come from (2)?

If the realized vol is $$\sigma$$ then your stock follows the GBM $$\frac{dS}{S}=r\,dt+\sigma\,dW_t\,.$$ If you price your call $$C(t,x)$$ with implied vol $$s$$ and using the Black-Scholes formula it satisfies the PDE $$\tag{1} \partial_t C+\frac{1}{2}s^2x^2\partial^2_xC+x\,r\,\partial_xC-r\,C=0\,.$$ The hedge portfolio consists of $$\partial_x C$$ amounts of stock $$S_t$$ and $$\frac{C-S_t\,\partial_xC}{B_t}$$ amounts of the money market account $$B_t=e^{rt}\,.$$
In the time step from $$t$$ to $$t+dt$$ the PnL from continuous delta hedging is \begin{align} &\partial_x C\,dS_t+\frac{C-S_t\,\partial_xC}{B_t}\,dB_t=rS_t\,\partial_x C\,dt+\sigma S_t\,\partial_x C\,dW_t+r(C-S_t\,\partial_xC)\,dt\\ &\quad=\underbrace{\sigma S_t\,\partial_x C\,dW_t+r\,C\,dt}_{d\Pi_t}\,. \end{align} The option value changes by $$dC=\partial_tC\,dt+\frac{1}{2}\sigma^2S_t^2\partial_x^2C\,dt+\sigma S_t\,\partial_xC\,dW_t+r\,S_t\,\partial_xC\,dt$$ which follows from Ito's formula applied to $$C(t,S_t)$$ where $$S_t$$ is driven by the realized vol $$\sigma\,.$$
Observe that $$d\Pi_t$$ and $$dC$$ have identical $$dW$$-terms which cancel in the following. Namely, the hedging error is \begin{align} dC-d\Pi_t&=\partial_tC\,dt+\frac{1}{2}\sigma^2S_t^2\partial_x^2C\,dt+r\,S_t\,\partial_xC\,dt-r\,C\,dt\,. \end{align} Using (1) this becomes \begin{align} dC-d\Pi_t&=\frac{1}{2}(\sigma^2-s^2)S_t^2\partial_x^2C\,dt\,. \end{align} The cumulative hedging error is $$C(T,S_T)-\Pi_T=\frac{\sigma^2-s^2}{2}\int_0^TS_t^2\partial_x^2C(t,S_t)\,dt\,.$$