First of all, there was no way for Israel to know whether the people they claim to be targeting were combatants when the attack occurred since Israel had no information about the status of these bombs when they chose to detonate them.
Secondly, placing a bomb in a common device that you have every reason to believe will spend much of its time in the proximity of civilians, in homes, markets and other public spaces, and choosing to detonate it without knowledge of the location of the bomb, or it’s proximity to your supposed target, is actively avoiding distinguishing between ‘combatants’ and civilians. I can’t believe that western brain rot requires this to be spelled out for it.