If you keep a suet feeder handy they don’t tend to knock on wood.
I keep suet as the last thing for the birds just to keep the woodpeckers from attacking the wood on thew house. Once they’ve done the breeding thing they won’t bother the wood on houses so much. If one is persistent, the pellet gun is sure remedy.