I noticed that when I do not have a playback instrument loaded, the exported midi file is empty. Is this a bug or expected?
That’s as expected. Dorico can only export MIDI using the current playback template. If your playback template is silent and your score doesn’t play back, you’ll get no MIDI exported.