No, xml:space = preserve
is talking about whitespace within the XAML. It's not useful to you here.
The important point is that the browser is displaying it with a monospaced font, whereas you're using a variable-width font.
Try:
FontFamily="Consolas"
within your XAML. (If that font family doesn't change the appearance, find another one which does, and is still monospaced...)