>now every WM have to repeat that work
wlroots?
That helps, but you still have to - at a bare minimum - wire up all the functionality. My pet example is trying out a new wlroots compositor and discovering that it has no way to change keyboard layout because it doesn't use that code from the library yet.
wlroots came pretty late so there was a lot of code duplication between Weston/GNOME/KDE before that.
wlroots is self-described as "about 60,000 lines of code you were going to write anyway." It's also a moving target and you'll probably have to retool when wlroots updates.
That seems like a huge burden to carry around, considering that a minimal X11 window manager can be a few thousand lines of code and probably still compiles after 15 years.