Ruud Kleinpaste gives us his top tips for stopping lemon tree borer. 
Life’s lesson for gardeners:
Do not prune your citrus/lemons and other susceptible plants in spring, summer and early autumn, as that would allow the borer beetles an obvious place to oviposit and start the trouble all over again.
So you can’t “cut out” the borer damage in the warmer months of the year
Instead:
1) find the toilet holes with plugs of borer frass (poo/sawdust) hanging from it
2) insert a fine plastic “straw” nozzle from an insecticide can into the hole and tunnel and fog the larva to death in situ.
3) alternatively: grab a piano-wire or guitar string and poke it into the hole to spear the lemontree borer grub up its bottom, so to speak - I found the best string to use is the G-string J
There is no point in spraying your citrus tree/bush with an insecticide, as the larva is totally protected inside the branch/twig – it’ll survive
There’s perhaps some merit in covering the winter pruning cuts with some pruning sealant.