If the IDF are 'minimising' civilian casualties and have in place mitigations to achieve that aim, why would you flatten a whole building when the only threat coming out of it is single missiles from one small part of it. Not exactly a surgical strike is it?
.
The IDF is probably so tied-up searching Hamas terrorist tunnels they can't spare manpower for dealing with jerkoffs who fire missiles from windows instead of waving white flags. So they called the Air Force to clear the building , and they did it their way. Since there's no such thing as Nerf munitions, it looked pretty surgical to me.