Comment attached to first beat gets wrong bar number attached to it

Yeah. Exactly the same goes for everything that isn’t voice-specific - dynamics, playing techniques, text, clefs, key changes, meters etc. and other voices. What if your comment was attached to a stave that had two voices on it, and then you used Insert mode?

The bigger issue is that Insert mode is voice-specific even in circumstances in which you’d rather it wasn’t. Improvements to Insert mode are planned. See e.g. Most important feature requests for Dorico 4 - #103 by dspreadbury