What is the code approved way to cut and patch fire rated drywall
There are several building codes that come into play for this question. You didn't specify your locality so I'll just assume you're in North America and that the most relevant code applicable to your question is National Fire Protection Association, NFPA 221.
In this case, I see no NFPA mentions for patching the drywall. That means following the code is, "per the manufacturers instructions." I checked the USG's installation instructions for normal and fire rated drywall and again see no difference in their patching instructions.
Drywall patching tips
Cut out a 2' square patch of drywall. It's so much easier to work with ample space. I usually center my cutout over a stud. You can use a magnet to find the fasteners in the studs. After cutting with a knife or drywall or oscillating saw, the 2' square patch can be pushed in on one side and the other side pops right out. Unless I'm trying to save the old drywall, I usually pull any fasteners through the old piece. Then remove the fasteners.
When finished working behind the drywall, find two pieces of scrap 1x3 or 2x4 furring that's a little longer than 2'. Center the furring inside the cut out hole so that half the wood is exposed and zap a few screws into that blocking. Now you've got a frame to set the new piece of drywall into.
Cut a new 2' square piece of drywall. You can cut the sheet of drywall into quarters at the store to make it easier to transport. Since your hole is 2' square, it's real easy to remember the exact dimensions. Slide the new square into place, fine tune the edge with a rasp if necessary, and zip a couple screws along the edges into that blocking and a couple more into the stud. Patch per the manufacturers instructions.