Barrel for sure. I had a custom ar-10 barrel made, similar issues. Spent a lot of money to only find out it was what I suspected and the barrel mani didn’t really want to fix. They had a guarantee though. Had them make a whole new barrel(thicker, different twist) and it shot lights out. Pencil barrels are not great for accuracy with gas system guns, in my opinion.