Woodpeckers are amazing birds. They are designed in such a way that despite the amazing force and speed with which they peck at wood, they do not get brain damage as a human would.
They also have the eyesight and hearing to be able to find a bug inside wood from a considerable distance.
Unfortunately, if that bug is inside the walls of your home, this is bad news for you, especially since woodpeckers are protected by law.
So what are your options? The best solution is to remove the insects that are living inside your walls, especially since they are doing damage to your home as well, even though not noticeable from the outside. You could also install netting or solid paneling that the woodpeckers can’t get through.
You also have the option of providing an alternate, more easily accessible source of food for the woodpeckers, such as suet, but there are no guarantees the woodpeckers won’t still peck at your house.