If the gun has been sitting around for a while, it is possible that the orings on the barrel are weak. That could cause the barrel to compress towards the opposite side of the body from the twist lock assembly.
Most likely it is due to the dimple where the twist lock assembly sits in the barrel being too shallow. The twist lock pin easily slips out of the dimple when this happens. If this is the case, you can take a drill bit and make the dimple a bit deeper. You only have to drill enough to allow the tip of the bit to start cutting without actually going deep enough to allow the sides of the bit to enter the new cut. The resulting dimple would allow more of the twist lock pin to sit in the barrel dimple and would prevent the barrel from twisting without applying force.
Except for the Automag in front, its usually the man behind the equipment that counts.