You may need to remove the bolt release and turn the mag release one or two turns in.
Did exactly that and then brought the AR along with a few other toys for a Sunday morning range session. The results are that the previously bad metal mag now locks positively and works with perfect reliability (doesn't fall out anymore). The mags that used to work fine continued to work fine.
The pmag however is no better whatsoever and still will not lock, it almost seems like that shoulder on the front of the mag where it transitions from straight to slightly curved is keeping it from getting far enough into the mag well to lock, the metal mags don't have such protrusion
Pmags are known to have issues with certain lowers. Tight fit in the mag well and not dropping free is the most common.
With some you have the hit them pretty good for the mag the seat, or latch into position.
Do a google search on Pmag revisions. You may have a early release mag. At one time Magpul was replacing them free. The mag well have a version letter code cast in the body.