Well, it should have been Iran which should have acted intellegent.
You cant have one neighbor that is supporting you and keeps 1200KM of your border not HOT where you don't have to deploy thousands of soldiers and weapon systems saving you millions.
Pakistan had no option but to respond, Pakistan has/had hot borders with India, Afghanistan, and Iran in the last decade.
Pakistan and Iran had smaller skirmishes on the border but it was usually kept
at down low so you didn't see much fuss being made on retaliation even if Iran apologized to Pakistan on the death of 2 Kids and other kids who were injured this would have gone away.
Just Like India had misfire of a missle couple of years back, they apologised for the mistake and there was no escalation. But Iranian FO and news channels started chest thumping and putting messages that shouldn't have been at the time Pakistan had no chance but to respond just like how IRAN was trying to send a larger message, Pakistan also sent a larger message