Certified GKH Gardening Expert
Unfortunately, this can have a few causes.
Sometimes a calcium/magnesium deficiency can appear as rot, and even promote it. This can be corrected, simply, with DOLOMITIC LIME.
For actual cases of rot...
You will have to ensure that the ground does not remain wet from overwatering to completely prevent the problem. Since that may be difficult to do, I would recommend adding WETTABLE SULFUR to the lime treatment. These two together will treat an array of issues, while conditioning the soil.
Otherwise, you should also treat the upper portions of the plant with a fungicide. This article will help: https://www.gardeningknowhow.com/garden-how-to/info/using-fungicides-in-garden.htm