Just a few suggestions before you try again...
1. REALLY clean it thoroughly before you go back out there. The XCR can and will run dirty and can take a lot of abuse, but you want to break her in gently. Get all the carbon, brass chips, unburned powder and crud out. Be careful with the bore, but keep going until it is buckingham palace clean.
2. Actually use a torque wrench to tighten the barrel bolt back on, 200 inch-pounds, or 16.67 foot pounds. Apply a witness mark to bolt and lower with something like nail polish or mechanic's dye marker.
3. Check the alignment of the gas tube (holes down), regulator, and the piston, gas collar, spring and bolt. Other folks have gotten brand new rifles where things just weren't drilled or aligned correctly from the factory. Now that was years ago but anything mechanical can be made incorrectly, be meticulous, if something is wrong, it can be corrected but only you can spot a potential problem like that.
4. Check the buffer, that's the rubbery horseshoe on the front of the stock assembly. Running at "4" will beat this component up but if you want it to shoot well across a wide variety of ammunition types and barrel lengths, you've got to break it in at "4". You can always replace it and they aren't that expensive. Loctite your ejector screws too.
5. Lube it up thoroughly, preferable a few hours before you go loud. Any sort is fine, the manual suggests LSA but really anything is ok, CLP, rem-oil, SLP 2000, synthetic non-detergent motor oil, Just don't be stingy.
6. Shoot slowly. You can (and should) test every magazine you own but I would suggest letting the barrel cool inbetween shots. A few guys and gals on this forum do the Camp Perry-style barrel break-in routine; shoot one, then clean the bore and bolt after every shot for 5 shots, (5 cleanings) then shoot 5, clean, repeat for 50 shots (10 cleanings) then shoot 10 shots, clean, repeat for 100 shots (10 cleanings). That is how palma and bisley rifle owners treat match barrels, with some variations. The XCR doesn't have a match barrel but you won't do anything but help it be as accurate and long-lasting as possible by proceeding this way.
7. If you can, shoot at 50 meters instead of 100. Use a sandbag or bipod if you aren't well-practiced. At 50, a normal XCR should be capable of a 2 or 3 inch group with even the worst ammunition. Naturally if you have any Winchester white box or american-made brass-cased, non-corrosive ammunition this might help by removing one unknown variable from the problem. A 1/9 twist barrel will like 55, 62, 64, or 72 grain ammo best to stabilize but at 50 meters it won't matter much. Expect to mangle brass at this gas setting.
8. If it still shoots terribly, come back to the forum and we will all pitch in to help.