This seems to be a bit of a classic problem. The lifetime energy output statistic will have errant 0 readings and it really throws off the graph, which will interpret the next reading as having produced your entire lifetime energy up to that point in that hour.
I found some discussion from 2021 about it https://github.com/home-assistant/core/issues/59285. I could repeatedly try the SQL query to fix it, like they suggest, but I was hoping since then people have come up with some easier and more thorough fix.