One of the conditions for the diagnostic code 21 is either an "open" or "short circuit" in the O2 heater circuit. Disconnecting the sensor makes an "open" so the code 21 would be expected.
In the table above a code 26 can be caused by several items. One thing not listed and the most likely reason if failure of the O2 sensor. Over time the sensor can get "lazy" and not outputting a good strong in spec signal voltage. For that reason the sensor should be considered a wear item requiring periodic replacement.