Ok, I'm sorry, but I really feel the need to clarify the vague wording and make sure you understand the differences in verbiage, and that you are properly setting up VT when flashing your tunes. After you hit Flash on your selected tune file, and hit Next at the first pop-up screen, the second screen is Tune Customizer. On this screen, hit Edit Settings and click on the Disabling DTCs tab.
View attachment 16042
This is where you
disable the codes relevant to the work you did, i.e. the ECU will no longer throw a CEL or flag that these particular aspects are an issue. If you haven't set that up, do so and reflash the map to eliminate any frivolous codes you're currently seeing that don't need to be paid attention to. Once that's done, we can begin further diagnosis knowing that we are all actually on the same page and are seeing only relevant codes.
Moving on, P2248 is not a code that VT is able to disable (at least not on my second gen), meaning it is probably not one that you
want to arbitrarily disable. Google tells me that this code designates "O2 Sensor Reference Voltage Performance Bank 2 Sensor 1." Since you recently messed with the downpipe to gut the cat, you need to revisit exactly what you did during removal/install, and make sure that you fully threaded and tightened both of the sensors and fully seated each of their harness clips. If that all appears to be in order, you are probably looking at needing to replace the offending sensor. Unfortunately, I do not know if Mazda designates primary/secondary o2 via the "Bank" designation or the subsequent "Sensor" designation, but my guess based on your rough idle is that Bank 2 Sensor 1 may be referring to your primary o2, as that's the one that really affects fueling on these cars. Check the connections, especially those pain in the ass harness clips, and maybe pull the sensor out of the downpipe to inspect the probe for signs of excessive fouling or unusual wear.