I suspect you're missing something here or not communicating what you're trying to say very well -- military personnel aren't going to sit around and do nothing if they're being shot at, they're going to return fire, call for artillery on the source of the shooting, call for aircraft support to bomb the source of the shooting, call for a QRF team to help them destroy the source of the shooting, etc.
Even "peacekeeping" forces are going to return fire if fired upon.
Having the British Army fire on and kill civilians in Northern Ireland was extremely controversial. Several incidents resulted in murder trials. Some of this is still going on. https://www.bbc.co.uk/news/uk-northern-ireland-49721166
> Even "peacekeeping" forces are going to return fire if fired upon.
My point is that there have been lots of places in the 20th century where troops have been specifically ordered not to do that without senior authorisation, because of the potential political impact of an escalation.
Or at the very least carefully identify who they are going to be shooting at, and provide a warning, rather than firing blindly into residential buildings.