The simulator has to output a specific waveform that takes ques from the upstream one. The one that you have is too simplified for the ECM - hence the P0136/P0137 codes. If this was on a pre-2005 Corolla, might work. Starting with the 2005 model year - they switched to a DBW throttlebody system and went with a wideband AFR sensor vs the conventional O2 sensor.
Assuming that the precat was likely removed to make room for the header? Still have the existing downstream cat attached or test pipe? Keep in mind that, depending on where you live at, even if the P0420 code disappears, the car will still fail a visual inspection, if any of those converters are gone - if the header doesn't have a CARB or EO exempt number, might be grounds for automatic failure as well.
The spacer you are inferring to sounds like the sparkplug defouler trick. Just happens that the rear O2 sensor and a sparkplug defouler have the same threads. You will have to drill out the center of the defouler to allow the O2 sensor's tip to be exposed to enough exhaust gases to take a reading. Will be an iterative approach, as too small an opening or too large - and you'll see a P0420 code thrown out. Just grab sparkplug defouler and the O2 sensor, see if they will thread into each other. Some had to stack two defoulers to get far enough away from the exhaust stream to fool the ECM.
I also wouldn't rule out a possible exhaust manifold leak - as those can also throw a P0420 code. Who makes this specific header? Hopefully you got the PPE header - as that is one of the few that is actually engineered to work well with the Corolla family of engines with 3-5 WHP gain with just a header swap were seen. The others are mainly for exhaust note and visual appeal - power gains from those are spotty, some actually make less power than the Toyota OEM tubular exhaust manifold.