my current machine uses KDE, whereas the other one used Gnome; but this can't be the reason.
I am not saying it _is_ the reason, but it is certainly possible. Markdown preview uses webkit2gtk which uses a lot of the G*[^1] infrastructure. By its nature that isn't a focus of a KDE distro, so its possible that there are interactions between the G* libraries and the KDE display server. Are you using a Wayland or X11 session?
[^1]: G* == GTK GIO Glib etc