Typically the abstraction to draw elemnts inside a app window is in the application framework, like GTK, Qt, Electron (chromium), etc.
This is also why apps built with the same framework typically have the same problem on wayland (looking at you, electron).
The abstractions you are thinking of is not in the window manager, which only controls things outside of the main app window, like tiling, border, window top bar, etc.
We don't judge here. :) (mander.xyz)
Can someone ELI5 why some apps need to support X11/wayland?
Isn’t this supposed to be a job for the window manager?...