This sounds to me like it might have something to do with the security system. With an 2002 XG350 if you lock the car with the remote and then enter the car with the key, alarms go off and the engine is disabled (won't crank). If you get in the car, close the door, wait 1-2 minutes for the alarm to stop, and then wait a few minutes more you will hear something click in the passenger foot area and then the engine will crank, start, and drive fine. If at any time in that period you try and crank the engine you will reset everything, alarm will go off, timers will be reset, etc.
You might try to intentionally set off your alarm and see if it acts like what you are experiencing.