It would really help us to know what Cakewalk program you are using.
Using SoftSynths within Cakewalk would be your best bet. Use your Yamaha keyboard only to enter the MIDI Data, and when playing back, each track should go to a SoftSynth, not back to your keyboard. Set it up so that each MIDI Track has its own MIDI Channel#.
Example: Track One - Drums Set to Channel#10 (because this a standard Ch.# for Drums)
Track Two - Piano Set to Ch.#1
Track Three - Bass Set to Ch.#2
Track Four - Clarinet Set to Ch.#3
ETC. ETC.
It is the MIDI Ch.# that keeps the tracks (voices) separate.
WHAT VERSION of CAKEWALK ARE YOU USING?