First: photosynthesis. It is synthesis of sugar which is CHO. You need CO$_2$ and a hydrogen donor; that can be H$_2$O and you get O$_2$ as a waste product or it can be H2S and you get S as a waste product. If you used NH$_3$ for your hydrogen donor(hmmm...) you would get N2 as a waste product. Are you the dude* with the boron planet? You could use boron hydrides and get some sort of boron thing as a byproduct. In all of these - when you are making sugar out of CO$_2$, carbon keeps its oxygens and incorporates them in the sugar.
What about photosynthesis that made a different carbon product? I could imagine an organism that wanted C. Maybe built its body out of C. Allotropes of carbon are super useful - graphene is ultra strong and diamond is ultra hard and conductive and clear and awesome. Even charcoal is durable in the environment for millennia - and in an environment with minimal O$_2$ it would last longer.
Could you have photosynthesis that stripped O$_2$ from C and just kept the C?
CO2 + energy -> C and O$_2$.. You could. You would call it photodissociation instead of photosynthesis because you are not synthesizing anything.
Evidence for direct molecular oxygen production in CO$_2$ photodissociation
Abstract Photodissociation of carbon dioxide (CO2) has long been
assumed to proceed exclusively to carbon monoxide (CO) and oxygen atom
(O) primary products. However, recent theoretical calculations
suggested that an exit channel to produce C + O2 should also be
energetically accessible. Here we report the direct experimental
evidence for the C + O2 channel in CO2 photodissociation near the
energetic threshold of the C(3P) + O2(X3Σg–) channel with a yield of 5
± 2% using vacuum ultraviolet laser pump-probe spectroscopy and
velocity-map imaging detection of the C(3PJ) product between 101.5 and
107.2 nanometers. Our results may have implications for nonbiological oxygen production in CO2-heavy atmospheres.
The article is behind a paywall but Google sees the image which shows the intermediate steps to liberating O$_2$ from C with radiant energy.

So that is my answer: catalyzed photodissociation instead of synthesis, producing O$_2$ as per the OP and making carbon allotropes out of the C.
*... and "dude" is now also used as a unisex term