Nissan Altima (1998) oxygen sensor goes bad as soon as it is repaired

I have a 1998 Nissan Altima (manual transmission). The “Check engine light” came on. The oxygen sensor went bad again. I have had this repaired twice (to pass inspection). Every time I get it repaired, I take the car back to the inspection station and then it passes inspection. But in a few weeks to a couple of months, the “check engine light” comes on again. Every time I get this repaired its almost $400-$500 expense. I should probably take the car to another mechanic this time but any suggestions will be greatly appreciated.

Is it always the upstream sensor?
High mileage vehicle?
Using some oil?
I’d also be interested in knowing the exact fault codes. They should be written on your repair slips (your copies of the shop orders).

Residue from burning oil can easily coat the surface of an oxygen sensor, preventing the sensor from operating properly. Without more details that’s the best wild guess I can muster.