Let $M$ be a transitive model of ZFC.
From my understanding, if $x \in M$ then what $M$ believes to be its power set $\mathcal{P}(x)^M$ does not necessarily agree with the external power set $\mathcal{P}(x)$ (i.e. $\mathcal{P}(x)^M \neq \mathcal{P}(x)$), because $M$ might not contain all subsets of $x$.
Here is where my confusion begins: Let $\varphi(x,p) = \forall y (y \in p \leftrightarrow y \subseteq x)$ be the formula saying that $p$ is the power set of $x$. As $M$ is a model of ZFC we have $\varphi^M (x ,p) \leftrightarrow \varphi(x, p)$ for any $x,p \in M$. But $\varphi^M (x , \mathcal{P}(x)^M)$ holds, which implies that $\mathcal{P}(x)^M = \mathcal{P}(x)$ and that $M$ is closed under subsets by transitivity. This doesn't agree with my understanding of transitive models mentioned above.
I should note, that I don't have much background in model theory and it is very likely that I'm missing something obvious.
Transitive models are closed under elementhood, not under subsets. In other words, $M$ is transitive if $x\in y\in M$ implies $x\in M$, and not as you suggest, $x\subseteq y\in M$ implies $x\in M$.
You are correct that if $M$ is transitive, and $x,y\in M$, then $M\models x\subseteq y$ if and only if $x\subseteq y$ (in $V$, that is). The only problem is that perhaps $x\notin M$.
But what you can say is that if $M$ is transitive, then $\mathcal P(x)^M=\mathcal P(x)\cap M$.