Postsynaptic density (PSD) is a protein condensate located under the postsynaptic membrane that influences the localization of glutamate receptors and thus contributes to synaptic plasticity. Recent in vitro studies have revealed the formation of droplets of various soluble PSD proteins via liquid-liquid phase separation. However, it is unclear how these protein condensates are formed beneath the membrane and how they specifically affect the localization of glutamate receptors in the membrane. In this study, focusing on the mixture of a glutamate receptor complex, AMPAR-TARP, and a ubiquitous scaffolding protein, PSD-95, we constructed a mesoscopic model of protein-domain interactions in PSD and performed comparative molecular simulations. The results showed a sharp contrast in the phase behaviors of protein assemblies in three-dimension (3D) and those under the membrane (denoted as 2D). A mixture of a soluble variant of the AMPAR-TARP complex and PSD-95 in the 3D system resulted in a phase-separated condensate, which was consistent with the experimental results. However, with identical domain interactions, AMPAR-TARP embedded in the membrane formed clusters with PSD-95, but did not form a stable separated phase. The results indicate that the phase separation behaviors in the 3D and 2D systems were distinct. Stable phase separation is more difficult to achieve in and beneath the membrane than in 3D systems.