I think the problem here isn’t that, so much as that Notion is using their editing interface even when you’re clearly only reading the document and can’t edit it, and kinda whitewashing it a bit so that it’s not actually editable (with event handlers to stop the normal editing things working, turning the caret colour transparent, &c.), and that seems to mess things up even further. (I don’t use Notion, but I presume their editing interface works better when it’s not read-only, because otherwise no one would be willing to use it.) Of course what they should have done is just produced the HTML (preferably server-side, but even client-side would be tolerable) and left it alone, no contenteditable, event handlers.