Assume an Earth-like or super-Earth terrestrial planet in a state comparable to Precambrian or Archaen Earth. The atmosphere is mainly nitrogen and carbon dioxide, perhaps some methane, but very little to no free oxygen. CHON(PS) life has evolved and struggled, but that's about to change: something has evolved to make use of all that CO$_2$. With a twist.
What biological process(es) would explain why these upstarts take atmospheric CO$_2$ and retain the oxygen rather than release it to the atmosphere? To be clear, I'm proposing the Great Oxygenation Event be inverted, with a net loss of oxygen as it somehow is incorporated into organisms and then, over geologic time, sequestered as carbon was on Earth.
Presumably there needs to be some evolutionary advantage to keeping the oxygen rather than pumping it out as a waste product, but I'm not sure what that would be.
The solution needn't be an alternative to photosynthesis as we know it, it just can't result in oxygen waste. A case might be made for carbon monoxide or other oxidized waste, with the organism retaining a single oxygen molecule from the reaction, as long as the effect is cumulative.
I have not specified that this planet has water oceans – if an alternative such as ammonia helps, then assume that is true even if unlikely.
Similarly, if adjusting the crust, atmosphere (other than the composition mentioned), temperature, or parent star in some way helps, assume it.
If this results in a Medea situation, turning the planet hostile to the organism(s) consuming the carbon dioxide and resulting in their extinction, so be it – as long as all that oxygen ends up locked away.
This is my first hard-science question, so if I've contradicted myself or overlooked something that makes answering impossible, point it out. This question appears to be related, but is not a duplicate.