Actually nuclear submarines already make their own oxygen with electrolysis so they don't ever need to (nor do they) surface, except to exchange personnel or to load additional food.
An artificial leaf that removed CO2 without these downsides might justify a refit.