According to everything you did up until the last sentence, the answer should be
$${4 \choose 2} \cdot 365 \cdot 364 \cdot 363$$
What makes you think otherwise?
If you used $364 \choose 2$ to represent the number of ways in which you can pick $2$ birthdays for the $2$ people with distinct birthdays (out of the $364$ remaining days), it's fine. But those two birthdays need to be assigned to the $2$ people and that can be done in $2!$ ways. So we go back to $364 \cdot 363$.
Responding to OP's edit and comments below
As to why we go for permutations here and not just combinations there's a lot to unpack. One factor that's important to consider is whether we are only counting the number of ways in which exactly $2$ people have the same birthday and all others have distinct birthdays or are we calculating the probability.
To make it easier to explain and to understand, let's consider a similar but simpler problem.
We have three distinct balls (representing the people here) and we have an unlimited supply of four different types of stickers - S, M, T, W (representing the different days / birthdays). In how many ways can each ball be labeled with a sticker such that exactly two balls have the same type of sticker. Will the answer be different if the balls were identical?
If the balls are distinct, the answer would be
$${4 \choose 1} \cdot {3 \choose 2} \cdot {3 \choose 1} = 36$$
Any of the four sticker types can be the repeating one ${4 \choose 1}$, any two of the three balls can share the same type ${3 \choose 2}$, and finally, the last ball can get any of the remaining three types ${3 \choose 1}$.
Now, if the balls are identical, the result would be $4 \times 3 = 12$ ways. The repeating type can be any of the $4$ types and then the non-repeating can be any of the remaining $3$. Nothing else to multiply because which two balls share the same sticker type doesn't matter.
So far, so good.
But what if we needed to calculate the probability instead of the number of ways?
When calculating the probability, we must treat the balls as distinct even if they are stated to be identical.
To understand why, let's return to the example problem with identical balls. Imagine the three balls are lined up in a row and you start putting stickers on them. You have decided to stick S on one ball and M on the other two. Here are the different ways you can accomplish you task.
$$SMM \;\;\;\;\; MSM \;\;\;\;\; MMS$$
While you get the same configuration in the end ($2 \, M$s + $1 \, S$), there are three ways to achieve this. And that makes this configuration $3$ times more likely than a configuration which could be achieved only in $1$ way. For example, $3 \, M$s. There's just one way to achieve this.
$$MMM$$
Hope this makes sense.$^*$
Going back to the original problem on hand, we must consider permutations and not combinations because we are asked to calculate the probability. And even if we were calculating "the number of ways", because people are distinct (and not identical), permutations would be the way to go.
Also, when calculating the denominator, you went $365^n$. So permutations.
$^*$ Perhaps it would cause less confusion if we didn't use "number of ways" to mean the same as "number of configurations".
Practically speaking, the number of different ways to paint two identical balls using only red and/or green colors is $4$ - $RG, \; GR, \; RR, \; GG$. But the number of distinct configurations one can achieve is only $3$ - $RG, \; RR, \; GG$.