AFAICT it sometimes, but not always, successfully sets this on switching from VE to WT. It seems to always work from WT to VE.
|mediawiki/extensions/VisualEditor : master||Single Edit Tab: Set switch editor preference via sessionStorage/promise|
|mediawiki/extensions/VisualEditor : master||Try to actually resolve visualeditor-editor preference setting when switching editors|
|mediawiki/extensions/VisualEditor : master||DesktopArticleTarget: Don't abort in SET mode if veswitched is set|
I noticed you removed the FF/Safari tags... Does this mean you reproduced it in a browser like Chrome?
I wonder if the request to store the preference does not always make it through in time in this case? Can you reproduce this with the cookie instead of the visualeditor-editor preference?