Got an owner's manual? Read up on "Headlight Sentinal." XJs offered an option for night lighting while you walk from the vehicle to the house, called Headlight Sentinal (or Sentry). The way it is supposed to work is, if you turn off the headlights before switching off the ignition, the lights are off. If you switch off the ignition first, then switch off the lights, they are supposed to remain on for a short period of time (don't remember if it was 45 seconds or 1 minute, but in that range).
However, the headlights are not supposed to strobe after they turn off. If your XJ has Headlight Sentinal, is it possible that your alarm system is an aftermarket installation that isn't happy coexisting with the Headlight Sentinal? I believe the Headlight Sentinal is a plug-in module that attaches to the headlight switch between the switch and the vehicle wiring harness. If you can find the module, try removing it and see if the problem goes away.