I'm not familiar with that engine, but I assume it has a fuel shut off solenoid.
Being a 1979, it would be straight mechanical injection and should continue to run with no battery or alternator input at all. I would check the fuel shut off and associated wiring..could be that something is shorting and causing the shut off to activate. On some engines, the temp or oil pressure senders will trip the fuel shutoff to prevent engine damage...might check those too. The ign switch might also cause this, at it is likely wired to the shutoff also.
'06 Ram 3500 4X4 QC CTD 6sp LB
'01 F350 PSD 4X4 6sp Crew Cab (sold)
'68 F250 C/S 4X2 C6/428PI
Stidham 24' enclosed car hauler
Bunch of big old cars
In theory, practice and theory are the same.
In practice, they are not.