Unfortunately his is one of those cases where what everybody knows is almost completely wrong.
“Green stuff”, as you point out, liberates oxygen when it is producing carbohydrate. IOW it only liberates oxygen when it is physically growing larger.
But the other half of the equation is why “green stuff’ forms those carbohydrates. And quite simply they primarily do it for the same reasons that animals eat carbohydrate: because it provides something that they can burn to produce usable energy. IOW “green stuff” respires exactly like you do. They absorb oxygen, combine it with carbohydrates, and expel carbon dioxide.
Two sides of the same coin. The problem is that while respiration and the consumption of oxygen goes on continually, 24/7, the liberation of oxygen only occurs while the plant is physically getting larger.
As soon as the light levels drop, such as at night or when the water becomes silty, the plants stop liberating oxygen. But they continue to absorb oxygen at the same rate.
As soon as the nutrient levels in the water decline, the plants stop liberating oxygen. But they continue to absorb oxygen at the same rate.
As soon as the water temperature becomes too high or too low, the plants stop liberating oxygen. But they continue to absorb oxygen at the same rate.
As you can imagine, when you have umpteen thousand cells per milliliter of water, and they are all actively respiring and consuming oxygen and nothing at all is producing oxygen the water becomes anoxic incredibly fast.
The problem is compounded when the plants consume so much oxygen that they literally suffocate themselves. The same occurs when the plants grow so fast that they consume all the nutrients and start to die. The dead bodies are a convenient source of nutrients for bacteria, many of which are facultative anaerobes. So the algae consume all the oxygen in the water, and then die. Then the bacteria start digesting the algal corpses anaerobically. That anaerobic digestion releases all sorts of partially oxidized organics into the water column, and they chemically bind up any scrap of oxygen that might still be left. But the bacteria have trouble digesting the more recalcitrant organics in the algal corpses without oxygen, so there growth rate slows. But they facultative anaerobes. They can survive without oxygen. Then as soon as the oxygen levels start to rise even slightly the bacteria consume the oxygen and use it to digest the remains of the corpses. That process ensures that the oxygen levels can’t return to normal until the corpses sink to the bottom and are covered by other sediments. That can take weeks, and during that time oxygen levels are perpetually depleted.
It’s a popular belief that plants produce oxygen, but the reality is that, to within tiny limits, plants consume just as much oxygen as they produce. IOW plants don’t actually produce oxygen, they just cycle it.