Working backwards, its the scallop cuts on the buffer face that is causing the release problem. On the positive note, when the upper is locked down on the lower, the back of the carrier pushes the buffer back away from the retaining pin, to take the buffer retainer out of play.
Back to one,
tape the trigger all the way back, lock the upper on the lower, pull the charging handle all the way back, then let it go forward. Now shotgun the upper open slowly,and see if the disco has retained the hammer (hammer was cocked back far enough for the disco to get a hold of it). Also, double check the disco spring to make sure that the disco is spring tensioned forwards. If when you shotgun the upper open, find that the hammer is on the back of the FP/carrier, you will need a new hammer to solve the problem.