Yes, sanitizing HTML elements will produce interoperability problems.
I would trust the input if it satisfies a given schema. Otherwise, I would try to fix unclosed elements to match the requirements for the object type content. At the last resource, instead of sanitizing elements, I would delete them and leave only the text. This idea is in the robustness principle: Be conservative in what you do, be liberal in what you accept from others. I also think this principle should be used with caution.
I feel a little disappointed on how we are facing problems that were resolved a long time ago. When Web content was understood as XML documents, each element had a specific syntax that could be validated. Elements were composable, and we were able to define declarative mappings to, for example, implement the downscale needed by the Mastodon UX to render a WordPress article. In this regard, I agree with most @stevenpemberton's arguments in his "The 100 years web" talk (https://www.youtube.com/watch?v=jl4fnY4BjEY). But, this is probably a story for another thread.