Try this...
Load one round of .223 into a magazine. Insert magazine, chamber and fire the single round.
Does the carrier lock back on the empty magazine?
If not you are likely under gassed. Could be due to gas block alignment, gas key loose or leaking on the carrier, leaking bolt gas rings, or as a last resort an undersized gas port in the barrel.
Is this a carbine , midlength or rifle gas system?