Lost here, and was it that the barrel nut was loose, and the entire barrel extension and barrel where rotating in the upper barrel socket,
Or was it that the barrel nut was tight, the barrel extension was not rotating in the upper receiver barrel socket, but barrel rotating against the barrel extension itself instead?
If the former, no harm/no foul, and easy fix by just aligning the entire barrel with barrel extension, the correctly tighten up the barrel nut to plus 35ftlbs to the entire barrel does not slip again.
If the later, then barrel should be replace, and not just loctite/rockset used to glue the barrels threads to the barrel extension threads to prevent rotation.
Hence when barrel is produced, its shoulder to extension is set so when its threaded to the barrel extension, should take 150ftlbs+ torque to get the two to index correctly. If barrel shoulder is too far back, then when its spun onto the barrel extension, the torque value will not be great enough to pressure secure the two together, and this can allow the two to separate instead.
https://youtu.be/Ru-ZiaEQNMs
Note, a shim can be used between the two, since this will insure that correct torque amount is applied to pressure lock the two together, but again, not a locking type compound, since heat or vibration can cause it to fail.
As for trying to save the barrel by reworking that end of the barrel just short of a thread rearward, you end up with the gas port and gas block shoulder now being .0625" too far back towards the barrel extension instead.
If such was done, then easy to pick up, since now the end of the gas tube will be farther back in the receiver, and may end up with the carrier key channel inner end crashing the end of the gas tube instead.
Where the end of the gas tube should be in the upper receiver.
So to sum it up, if it was the barrel unthreading from the barrel extension, and not just a loose barrel nut to allow the entire barrel and extension to rotate in the upper receiver barrel socket, and barrel was not replaced, would call up the manufacturer to ask how they fixed the problem.
If shim, or replacement barrel extension that was slightly longer to achieve the correct torque of the two to pressure lock them together, all is good with the world. If anything like a compound locker or shoulder peen'g comes up, then would be sending the upper back for the barrel to be replaced isntead.