After travelling 7-8km on my Royal Enfield Classic 350, the bike acts as if the fuel is finished & the engine shuts down, but it starts again when I pull the accelerator.
What could cause this behavior? Could it be the carburetor?
IMO you have a fuel starved vehicle. Perhaps some blockage in the gas tank at the petcock filter or an inline filter between your gas tank and the carburetor.
When you run the bike the fuel might not be filling the float bowl at the rate that the engine is consuming fuel. When your bike stalls the fuel is trickling into the float bowl and then you can start it again.
I would take your petcock out and thoroughly clean it as well as clean any inline fuel filters you have and see if you can get any silt or debris out the fuel system.
If you do have lots of silt or debris you would want to remove the carburetor and clean it all out with pressurized carburetor cleaner to squirt out the jets, but that's ancillary in my opinion.
It's sounds like fuel starvation from my PoV. Clean out/replace any/all fuel filters in your system.
That's fuel starvation. Common with carbs and gravity feed. Your enfield has a vacuum petcock. If cleaning fuel filters doesn't work try another Percocet setting. You may have off, on, reserve. Or you might have a 'prime'
If you have a prime setting try switching to that. It doesn't use the vacuum to allow fuel to flow. Try driving on that setting. If it solves the problem then you either have a bad petcock diaphragm or a vacuum leak on the vacuum line from your manifold to the petcock.