protecting batteries from cross discharge
You need overcharge and overdischarge protection. Btw. you have mistake in your circuit. Inverting input must be connected to solar panel, and non-inverting to battery. So it would make what you expect.