I suppose this happens in the case of overlapping decorations? I didn't think of that as my use case does not allow overlapping decorations. What if the
dom attribute was a method which returns a DOM node for the decoration to use. That way it could be created multiple times. Or are there other reasons why this would not be possible?
Supporting custom DOM nodes would also make it necessary to expose a destroy method like node views do.
I think I could make it work using this approach, but unfortunately I won't be able to reuse the tooltip component that I already have, so I'll have to reimplement most of the tooltip logic, which isn't ideal.
I'm not sure how many use cases would benefit from custom DOM nodes in decorations, so it might be better to keep it simple if it adds too much complexity in the implementation or API.