XWayland is just a compatibility layer that provides a basic XServer that then talks to Wayland. While it works OK with GTK2 apps (and, eg, some Java app) its just a temporary fix, no further development is likely and I'd be surprised if it even gets bug fixes. As wayland 'develops' (ie gets it many bugs and missing parts fixed) its unlikely XWayland will track it.
So, lets not mess around, GTK2 is more or less dead.
So, use Qt5 or Qt6. Newer OS will have the appropriate libs in their repositary, sadly, older OSs will not *
As a general rule however, I set the Qt5 version of my app to use XWayland too. **
GTK3 is getting better, the Lazarus trunk version does work, my app builds and runs but, again, sadly, falls over frequently. (I'm trying to find out why.)
Davo
(*) prebuilt Qt5 and Qt6 libraries, only for use if your distro ones do not work,
https://github.com/davidbannon/libqt5pas and
https://github.com/davidbannon/libqt6pas (**) to tell Qt5 app to use xwayland, set an env var to xcb. eg QT_QPA_PLATFORM=xcb tomboy-ng