In that case since you can delete the code and it still appears, means the fault is still there. You need to repair the fault first.
Like my SUV the O2 sensor code appears once in a while, after clearing it, will appear again after one month sometimes longer. Had is changed once, but came back...