1999 GMC Jimmy - Loses power

My car randomly looses engine power while driving and resets to a state as if I had turned the key on but never started the car. In the last 2 years trying to figure this problem out ive replaced the fuel pump and inline fuel filter(3 of these) including the recall for the fuel pump pigtail, intake pressure regulator, cap and rotor, plugs and wires, ecm computer, spark control module, oil pressure sensor, radiator water pump and thermostat, battery and cables ground line and cruise control blinker module. The car was just in a shop for a week the drove it around and were easily able to duplicate the problem but the scanner registered nothing other than the engine was off there are no codes or pending codes. This problem happens on smooth roads rough roads or waiting on the light to change but not sitting at an idle. Fuel rail pressure is oem spec cat is good timing is good jigling the key cylinder does not make it happen and no one can figure this out please i need help

A faulty crankshaft position sensor can cause the engine to shut off while the vehicle is being driven

https://www.rockauto.com/en/moreinfo.php?pk=1112491&cc=1355307&jsn=425

If the computer loses the signal from this sensor, the computer see’s no reason to operate the fuel and ignition systems, and the engine shuts off.

Tester

Another idea, a key chain wiggling around during driving can turn off the engine if the ignition switch is faulty. Try driving with just a single key in the ignition, might provide a clue.

The key cylinder makes no difference on it and crank sensor checks good the cam sensor is built into the distributor column and according to the manufacture if it is bad the car wont even start

This never works these days. Find the engine to body ground and make sure it isn’t broken or rusty at the body end. Bad grounds can cause strange things including (rarely) engine stalling. If you have had problems with wipers you may have a bad ground.

Try to eliminate as much stuff as you can as potential causes. Like discover if the reason the engine is stopping is due to lack of fuel, or lack of spark. Your shop for example could configure a fuel pressure gauge where the driver could see it. If the fuel rail pressure drops significantly just before this symptom happens, you’ll know it is a fuel problem. If the fuel pressure doesn’t drop yet the symptom still happens, then it is probably a spark problem.