Get an inline spark detector and check to see if you have spark when it is shutting down or no spark.
A gas cap vent unable to breathe can cause that symptom. Easy to check and eliminate the problem if that's the culprit.
And so will debris plugging the outlet at the fuel tank.
JD fit a fuel strainer inside the tank on a lot of their mowers.
Go to the JD parts look up http://jdpc.deere.com/jdpc/servlet/com.deere.u90490.partscatalog.view.servlets.HomePageServlet_Alt and check what is fitted to your model.
Also some fuel filters can develope an air lock when installed vertically.