I see. Go to Logic Settings >Recording and enable "Autodemix by midi channel..." which will put Logic into Multi Player/Live mode.
Set the V Piano to say hardware midi channel 1 and the XS-8 to say hardware midi channel 2.
Set the Logic instrument piano tracks to ch.1 and the other to ch.2.
Arm the tracks and play or record - in this scenario it does not matter which track is selected cause they will follow the midi channelizing law.