If you did the ECU reset procedure after installing the new sensor, and you still have a check engine light, it's possible that there's a shorted wire at the ECU side. Troubleshooting O2 sensors codes are a pain and would require a multimeter if you wanted to find out the problem on your own. You would have to measure resistance between connectors on the harness side. That would make sure that it's not the new sensor that's defected. Process of elimination.
You replaced the sensor with a new one and still have the same problem, that's strange. I think it's safe to say that the sensor problem and gas mileage problem are related.