Does maximal Cohen-Macaulay modules localize?

Let $$A$$ be a Noetherian local ring and $$M$$ a finitely generated $$A$$-module such that $$\operatorname{depth}M= \dim M=\dim A.$$ I can prove that $$\operatorname{depth}M_{\mathfrak{p}}= \dim M_{\mathfrak{p}}\leq\dim A_{\mathfrak{p}}\quad\forall\mathfrak{p}\in\operatorname{Supp}M.$$ I guess the inequality is in fact an equality, but can't seem to be able to prove it. Does anyone have any idea?

P.S. If $$A$$ is Cohen-Macaulay and $$\operatorname{pd}M<\infty$$ (i.e., if $$M$$ is perfect), then it can be shown using $$\operatorname{pd}M=\operatorname{depth}A-\operatorname{depth}M.$$

It is true if $A$ is CM. I'm not sure if $A$ is not CM. Here is a proof:
Let $\mathfrak{p}\in\operatorname{Supp} M$, and $\operatorname{ht}\mathfrak{p}=n$. Since $A$ is CM, there is an $A$-sequence $a_1,\ldots,a_n\in\mathfrak{p}$ (see Matsumura, Commutative Ring Theory, Theorem 17.4). Since $M$ is maximal, it is also an $M$-sequence (see Eisenbud, Commutative Algebra, Proposition 21.9). Then $a_1/1,\ldots,a_n/1\in\mathfrak{p}A_{\mathfrak{\mathfrak{p}}}$ is an $M_{\mathfrak{\mathfrak{p}}}$-sequence, so $\operatorname{depth} M_{\mathfrak{\mathfrak{p}}}\geq n$. On the other hand, $$n=\dim A_{\mathfrak{\mathfrak{p}}}\geq\dim M_{\mathfrak{\mathfrak{p}}}\geq\operatorname{depth} M_{\mathfrak{\mathfrak{p}}},$$ so they are all equal.