AI attacks empty mortar if this has fired upon it and keeps attacking the mortar even if the gunner has never been spotted and he's miles away. The engaging only stops when the mortar is destroyed or the gunner is dead.
It seems realistic that they may have heard the mortar firing and want to have their revenge on it, but why the empty mortar ceases to be a target when the gunner, whom they've never met, dies somewhere far away?