Currently when writing abbreviations such as “e.g.” and “i.e.”, typst treats them as separate sentences, and adds spaces and breaks them across lines as necessary, for example:
Just wrapping them in a #box should prevent the abbreviation from being broken across lines, I think. You can automate this with show rules like show "e.g.": box
Indeed that makes sure it doesn’t break across lines; however, they are still treated as essentially two sentences so the large spaces in between and after. Ideally, “e.g.” should be seen as a single word.
I cannot reproduce the wrong spacing and it would surprise me as Typst doesn’t really have a notion of sentence spacing as far as I know—even with justification enabled. "e. g." looks weird yes but that would be incorrect anyway.
Apologies. It appears the issue that I have used a show rule for period meant for maths mode. After I restricted it to maths, this doesn’t appear again.