This is how it looks, because if you just let it run, both will keep heating the storage from time to time when it is empty, regardless of whether it makes sense or not. The district heating after the morning shower and the sun only a little later, but by then the money has already been spent. This is exactly what should be prevented here.
The ST should heat all the water as long as there is sun. Or rather, the district heating should only start when there is no longer any prospect of charging the storage from the ST.