“In daylight, plants are both respiring and photosynthesising, so oxygen and carbon dioxide are diffusing in and out of the leaves. But overnight, without sunlight, photosynthesis stops and stomata close. With just respiration taking place, only oxygen diffuses into the leaves and only carbon dioxide diffuses out.”
https://www.rhs.org.uk/advice/understanding-plants/how-plants-breathe
This is pedantic. The amount of co2 released when plants aren’t photosynthesizing is very negligible.
I’ve run co2 supplementation in my rooms and have co2 controllers that monitor atmospheric co2 and also shut off co2 supplementation at night. The atmospheric co2 ppm in a small room full of vigorous plants increases by <10% at maximum. For context if you and I went into the same room with no plants and had an enthusiast conversation the atmospheric co2 ppms within the room would >triple in one hour or less.
Plants are overwhelmingly carbon sinks and release a very small amount of co2 when not photosynthesizing.
All living things need to respire in order to survive. This includes plants! But it is true that the net carbon uptake from photosynthesis is greater than the CO2 release from respiration.