When you delete a soft synth, any tracks that had previously been routed to it must be re-routed somewhere else. That "somewhere else" will generally be the next destination on the list and might be wildly inappropriate, such as an external hardware controller.
Whenever you want to substitute a different soft synth for an existing track, it's best to insert the new synth first and re-route the tracks before deleting the old synth. If the MIDI tracks are being retired rather than reassigned, and won't be used or won't be needed for a while, archive them. Archived tracks, whether MIDI or audio, are completely ignored and therefore cannot cause any problems.