This issue was already reported to KDE developers.
Read the comment from a developer please:
"Not sure if this can be addressed in QColorDialog. In Wayland, it is explicitely forbidden to read the screen contents. KWin offers an infrastructure for screenshot applications. I am not sure if the protocols used there use a standard that Qt could follow.
I suggest to report this to Qt developers (as a bug for QColorDialog)."