QGuiApplication::queryKeyboardModifiers() (which calls QPlatformIntegration::queryKeyboardModifiers()) does not work on wayland (or better, the default implementation, which just call QGuiApplication::keyboardModifiers(), gets called). Not sure if the re-implementation should be done by the kwin QPA (as it also doesn't work with weston), but I can't find an equivalent of QXcbIntegration in qtwayland.
For some context, see comments in https://phabricator.kde.org/D7519
I'm sorry, but this is out of scope for KWin. This is functionality which needs to be added in QtWayland.