I just found out about getComposedRange and how it solves an issue around retrieving text selected across shadow DOM elements.
However it seems that getBoundingClientRect is not present on this new class, while it existed on Range
Is there any way to get the rect of a selection inside a shadow root?