It has been reported and I can reproduce it, too that Kleopatra does not pop up in the foreground correctly when it does not have the AllowForegroundWindow permission. This can happen regularly. For pinentry this was a long standing issue that the passphrase dialog was in the background. We have an elegant solution for that with the logic from Pinentry with:
I hope that we can apply this somewhere centrally in Kleopatra.
This is important because it confuses especially new users who would not recognize a blinking Kleopatra icon in the task bar.