Some work has already been done:
feat(Spacing): optimize vexflow voice spacing/scaling, refactor 817762a593aeb8bd13b49e550203b28ece698843
A discussion of the Vexflow 3.x formatter, which sometimes doesn't layout measures as regularly as 1.2.93, especially with half notes:
https://github.com/0xfe/vexflow/issues/798
An interesting comment from the Vexflow creator on notes overlapping the measure and calling getMinTotalWidth():
https://github.com/0xfe/vexflow/issues/778#issuecomment-616197758
It looks like for now we should stick to Vexflow 1.2.93 in most cases. There are also some issues with tremolos in 3.x.
Perhaps good to discuss... I switch to use formatToStave function vs. format - This corrects the beginning measure having extra space and seems to help the other measures. I'm just not sure if this is short-sighted or there are other issues, so committed for now so it can be reviewed and discussed.
if formatToStave is the solution, that's brilliant! I didn't have that function in my mind.
I'll have a thorough look at the visual regression diffs. If it's better in most cases and doesn't have severe drawbacks, let's use it.
So, for compact scores with only one voice/instrument these settings are great to make them really compact:

but it seems like we shouldn't use this as default settings, some scores with piano and/or multiple instruments have some rendering issues:
Mozart - An Chloe

Clementi Sonatina 36/1/1:

OSMD Function Test Grace Notes:

OSMD Function Test Tabulature:

Most of the scores work well though, so we could have this set by an option, like in the existing compacttight mode, or maybe it should be a separate option.
Though in any case, every user can set these parameters themselves anyways.
I can implement this option setting myself, if you don't mind.
Sure, that is fine
This is merged to develop now.
Before the merge, i made it so that the current settings in this branch are only applied in compacttight mode,
and i set the default multiplier and addend back to 0.85 and 3.0.
This is closer to the original 1.0 and 5.0, to make some scores a bit less cramped, e.g. Clementi:

the (red) eights were a bit too compacted and too far from the ending barline.
But we still now have more compact scores and options to make it even more compact (compacttight mode),
or set the parameters oneself (osmd.rules.VoiceSpacingMultiplier and VoiceSpacingAddend).
Relevant parameters if you want to change the spacing:
osmd.EngravingRules.VoiceSpacingMultiplier // default 0.85, 0.65 in compacttight mode
osmd.EngravingRules.VoiceSpacingAddend // default 3.0, 2.0 in compacttight mode