It may well be that the introduction of Continuous Controllers at the end of the Midi Track(s)could help.

CC 121. Reset all controls - Data zero.
cc 123. All Notes Off - Data zero.

There is likely to be a System Exclusive Stop Message available somewhere appropriate to your Synth. See the Manual.

Also try the Sysex to re-initialize the synth at the end of the sequence. Again this should be in the Manual.