My best guess at this point without looking at or being able to check the rifle is that the problem isn't the barrel. I assume you're are running on an AR platform and if so I would take off the handguard and give the barrel nut some more torque. If it were my gun I would check there and examine your optic mount and the optic itself. I would try to trouble shoot in that order and cross my fingers that I found the problem somewhere.