Yeah, countries should stop warring and deal with stuff behind negotiation tables. Because during any military confrontation in densely populated areas such things happen, as for reasons: Ukrainian military probably placed some weaponry or relocated a militant group nearby. For objectivity point - Ukraine did the same during the Donbass conflict:
https://www.hrw.org/news/2014/07/24/ukraine-unguided-rockets... (legit Human Rights Watch source)