[I changed the title and the body of the question. Below I explain why I did so, and paste the previous version.]
Let (UPIF) (for "Unique Prime Ideal Factorization") be the following condition on a noetherian domain $A$:
If $\mathfrak p_1,\dots,\mathfrak p_k$ are distinct nonzero prime ideals of $A$, and if $m$ and $n$ are distinct elements of $\mathbb N^k$, then we have $$\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}\ne\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$
The main question is
Do all noetherian domains satisfy (UPIF)?
Of course Dedekind domains satisfy (UPIF), but other noetherian domains $A$ also do. Indeed, as noted by user26857, if each nonzero prime ideal of $A$ is invertible or maximal, then $A$ satisfies (UPIF). To see this, assume by contradiction $$ \mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}=\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$ We can also assume that all the $\mathfrak p_i$ are maximal, and that $m_1>n_1$. Then $\mathfrak p_1^{m_1}$ contains $\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}$ but doesn't contain $\mathfrak p_1^{n_1}$. As $\mathfrak p_1^{m_1}$ is primary, this implies that the radical $\mathfrak p_1$ of $\mathfrak p_1^{m_1}$ contains $\mathfrak p_2^{n_2}\cdots\mathfrak p_k^{n_k}$, and thus $\mathfrak p_1$ contains one of the other $\mathfrak p_i$, contradiction. In particular, one dimensional noetherian domains and domains of the form $B[X]$, $B$ principal ideal domain, $X$ an indeterminate, satisfy (UPIF).
Here are the reasons why I changed the title and the body of the question (and added the "noetherian" tag): user26857 answered the original question in a comment, but didn't want to upgrade his comment to an answer. If they had, I would have accepted the answer and asked a follow-up question, but I thought it would be better, under the circumstances, to avoid creating a new question.
Here is the previous version of the question:
Previous title: Unique non-idempotent prime ideal factorization in domains?
Previous question:
Let $A$ be a domain; let $\mathfrak p_1,\dots,\mathfrak p_k$ be distinct non-idempotent prime ideals of $A$; and let $m$ and $n$ be elements of $\mathbb N^k$ such that $$\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}=\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$ Does it follow that $m=n\ ?$
[Recall that a domain is a commutative ring with one in which $0\ne1$ and $a\ne0\ne b$ implies $ab\ne0$.]
I suspect the answer is No, but I haven't been able to find a counterexample.
Edit
(1) If $A$ is a noetherian domain, then $(0)$ is the only idempotent prime ideal of $A$.
(2) Say that a domain satisfies Condition (D) (for "Dedekind") if the multiplicative monoid generated by the non-idempotent prime ideals is free (over the obvious basis).
Then the above question can be stated as: "do all domains satisfy (D)?"
Of course Dedekind domains satisfy (D), I but I know no non-Dedekind domain satisfying (D). (And, as indicated, I know no domain not satisfying (D).) For instance I'd be happy to know if $K[X,Y]$ satisfies (D). (Here $K$ is a field and $X$ and $Y$ are indeterminates.)