One possibility would be the Voltage Regulator or Cutout. When you start your tractor and the generator begins to putout, a set of contacts close to connect the generator to the battery. When you shut your tractor off and the generator stops, these contacts are suppose to open and disconnect the battery from the generator. If these contacts stick closed, it will keep the generator connected to the battery and run down the battery.
One way to check this is to connect a voltmeter or test light between the Voltage Regulator BAT terminal and the GEN or ARM terminal. Under normal conditions with the tractor not running, you should have voltage present. Start the tractor and run at full thottle, no significant voltage should be present. Shut the tractor off and the voltage should return.