I think your post deserves an answer. The issue is one of watching over our interests. In pursuit of interests, casualties and losses are expected.
We are taking casualties because Pakistan's foreign policy remains independent to this day. Pakistan will not bend to what the regional or extra-regional powers want to dictate to us. This is where multiple fronts are opened up to force Pakistan into submission. Now its a matter of the will of this nation because it will be bombarded with propaganda (you will hear how Pakistan is regressing, how religious militancy is taking over Pakistan etc. when the reality is that things have been trending upwards despite the LICs and massive drain on the economy) and you will see economic threats being hurled and you will see military pressure being applied. Let me state this very frankly that on the eve of 1947, this country was never tested. The ones who joined the federation of Pakistan were mostly landed families who did not spend a night in the jails of the British during the freedom struggle. So the independence was had rather easily. But for other reasons, now we are having to pay these dues in both blood and treasure. As long as the Pakistani nation values what it is sacrificing in pursuit of Pakistan's goal of running an independent foreign policy, these sacrifices are well worth it.
What has gone on in Afghanistan and what is going on there with Taliban is what I call the long play. In the short to medium term, Pakistan will suffer reverses and casualties, but if the goal is to secure Pakistan in the long run then these fronts will have to be taken up despite losses in men and material. We don't have an alternate. Giving up in Afghanistan is going back to the situation prior to 1979 with an antagonistic eastern and western front. This is because there is no incentive for India to settle the Kashmir issue and with the Americans using India as a proxy against China (see the revamped American National Defence Policy), increasingly Pakistan and India will be at odds.
As for this thread, we should remember that when Pakistan meets India on the LoC/IB, it is done on the basis of equals and reciprocity. This is no small task for a smaller nation faced off against a much larger adversary. I don't say this to brag, but to highlight that we have to do this because we don't want to be cowed by anyone. The actions taken against the Indian side is in line with Pakistani posture to deter with reciprocity.
For some, the easy way would be to surrender Pakistan's own interests in favour of those of the regional/extra-regional powers and call it a day.