I saw this over the weekend, I believe it was two XWayland windows - one being a game running in Wine and the other Krita (which forces XWayland.) When I used my tablet, it would sometimes "click" into the Wine game despite the tablet's own cursor never ending up there. Then it would try to draw normally, which usually wouldn't work. This might need to be moved to KWin once I figure out the cause.