Your car is a fairly rare bird; you might not find many knowledgeable answers here. The early XJ40 had the same engine but a different EFI system; hence, you might find more help for the engine on that list, but in this particular case it’s likely an EFI issue so perhaps not.
I will make two suggestions based on V12 experience.
- Your fuel system perhaps consists of a main tank feeding a small “surge tank”, and the fuel pump draws fuel out of that surge tank. There’s a plastic pickup screen on the end of the pickup. The surge tank collects an assortment of crud, usually rust flakes. When you start the engine and the pump starts sucking, gradually this crud collects on the pickup screen and plugs it up, stalling the engine. When you shut it off, the pump stops, and the crud falls off the screen and back to the bottom of the surge tank. Rinse and repeat.
Two possible fixes. Jaguar’s fix was to replace the pickup screen with a larger one, hence tougher to plug up. My fix was to remove the pickup screen altogether and instead install a 1/2" inline fuel filter in the hose from the pickup to the pump inlet. For me, this involved adding about 3 feet of fuel hose to form a large loop around under the battery tray in order to fit that fuel filter, but none of that hurts anything, it worked great. From then on, when the filter gets plugged, you replace it – and throw away a lot of that crud that was in the surge tank when you throw away the old filter.
- A bad coolant temp sensor (the one for the EFI system) notoriously causes an engine to start cold and run worse and worse as it warms, usually stalling before reaching operating temp. Test is to disconnect the CTS and short the terminals in the harness together with a paperclip or something. If the engine runs much better, especially when warm, replace the CTS. They’re pretty cheap for the V12, it might be the same part for the 3.6.