Detect when AI path is blocked

So what I’m trying to do is to tell my AI while they are in move to the target (base) if their path is blocked by obj (they can break it) so break it. if their path is valid even that there are those obj, i dont want them to destroy those obj.

I used nav modifier on that obj to higher the cost but they still attacking it so it might not help.

anymore suggestion ?