You can though, in the middle of a dialogue, switch characters (F1 F2 F3 F4) and have them initiate a dialogue... (to be re-tested).
But, yes, the ideal is to choose the right companion before starting the dialogue.
This "trick" also allows companions to do stuff while another is in dialogue.
You can't have two conversations at once, so this only works to do stuff while someone is talking, so will not help with dialogues that are initiated upon the player...also, backing out of a dialogue just to let someone else start all over again feels again rather janky...