OK, let’s try some “diagnostics” to narrow down the problem:
Do all of your engines do this, or only one or two? Do you have any engines which don’t do this at all?
Is there a specific section of your layout where you have this problem, or is it all over the place?
Put two engines on the track at the same time, separated by at least a few feet so they don’t run into each other. Get them both running. Do they both stop and start at the same time? Or does one stop while the other keeps going?
What happens to the headlights when the engine stops. Do they flicker out and come back on, or do they stay on?
What are you using as a power supply for your DCC system? Is it rated high enough to drive the system, and are you running anything else off of it, like structure lights, streetlights, turnouts, etc.?
The first question is trying to figure out if this is an engine problem. It could be a loose wire inside the engine, or trucks shorting to the frame.
The second question is looking for track wiring problems. It may be a loose wire, or perhaps you just don’t have enough feeders, and the rail joiners aren’t doing the job.
The 2-engine test will tell us if the DCC system is cutting out, or if if this problem is isolated to one engine or stretch of track.
Headlights show if you’re getting power at all. If they stay on, then there may be a wiring problem in the engine.
Finally, if you’re using an undersized power supply, you may just be running out of available power.
Let us know what you find out.