Net production of CO2 in plants
Plants are able to store energy as carbohydrates, i.e. they can make more carbohydrates than they need for their metabolism  when there is no sunlight, and store it for later use. So the amount of energy in your equations is not equal. 

Some plants are offering this stored energy as sugars as nectar or fruits in exchange for pollination and spreading their seeds or use it as energy storage for times when they can't make enough carbohydrates for quick use, e.g. in winter or as storage for high demand, e.g. quick growth to outsmart competitors for space. 
In addition, quite much of this fixed CO2 goes into structures like stems, roots and leaves and thus is sequestered for some time from the atmosphere.