This almost looks like an extractor issue - the extractor is failing to hang into the spent casing, and the ejector is popping it loose before it fully clears the chamber, or clears the ejection port opening. Since it doesn't happen every time, and some rounds are clearing, the ejector is working - see if that thing had some stout spring pressure by trying to push it in with a spent case. You can also see if it's sticking in position the same way. Remove the BCG from the rifle, hook the rim of a spent case into the extractor, and press it "straight" onto te bolt face to depress the ejector. Hit that a few times to see if there's any hangups with the ejector, or if the case rim slips off the exrtactor.