I can only barely appreciate or fathom the endless masochistic self-abuse of maintaining functional, useful semi-headless UI automation testing for various Linux distros.
If you did have UI automation, you probably would do it at the DE level, and not swap things like X11 for Wayland. If you don't update (or use something like XFCE), it would probably remain functional for decades