This bug goes from "slightly annoying" to "worms are destroying my walls" if you're defending against a rampant siege and this bug happens. And this bug happens a LOT more when you're defending constant attacks. It seems related to searchlights following biters outside their assigned area, but that can't be the entire picture. I've set the searchlights to cover the entire area biters can appear, and they'll still get stuck staring at the inside of my walls. It's difficult to figure out why this happens, since I can only find searchlights that are stuck when they're really obvious.
The temporary fix is to change one of the values in the searchlight, which resets it. So after many hours of fiddling, I finally found a decent and permanent solution to the problem. Connect all your searchlights to a central circuit network, and read the values off the main network. Then, set up a clock to pulse a different value to your searchlights every minute. It's hard to explain if you don't already know how to use circuits, so I set up some blueprints, complete with explanations. You only need 1 or 2 combinators per searchlight to fix things.
https://factorioprints.com/view/-NnxB5Tc4fTQri8Mm-bZ
Theoretically, this is a mostly-okay fix for the bug in the mod. Rather than trying to find and fix the bug, just hide the problematic behavior. Check the actual position of the searchlight against the search boundary roughly every minute. If you find the searchlight out of bounds, run the same initialization code that runs when new settings are applied.