You need to create a route or a binding (whatever is easier) with Onscreen keyboard as the source and XR18 as the destination. For the route, you may need to create a filter to eliminate anything that you don’t want to arrive at your external keyboard:
I’ve set the route to only transmit CC11 - adapt to taste…
I usually prefer bindings for single-purpose connections. It could look like this:
This will send controller 11 data created by a slider on the controller bar to whatever is connected to “External Synth”.
BTW: I’d recommend to NOT name Cantabile’s logical MIDI ports after the actual hardware connected to them, but give them more “abstract” names. Makes things less confusing when you change out the hardware. So it’s better to call input ports “Main Keyboard” or “Upper Keyboard” instead of “XR18” - you may change your controller some time in the future and don’t want to have to change all your song files.