Sudo in graphic

I have a problem with the command sudo only in graphical command : several time it doesn’t recognize the command and failed. I post here because I have the same issue on two differents machines with KDE6, one on Manjaro, an other on KDE Neon.
I tried to change several times the password with the command : passwd it works for a short time. On konsole the password is recognize immediately.
How to make it works correctly.
Thank You.

Someone says that it is a problem from polkit that crashes for any reason. Hope a correction for that. Thank you all.

I fixed a recent polkit crash; see 485407 – polkit-kde-agent crashes with nullptr in PolicyKitListener::finishObtainPrivilege() when run in Hyprland.

If you’re saying that running sudo [something] isn’t working, this isn’t a KDE problem but rather a configuration, distro packaging, or upgrade issue.

Thank you for answering but that doesn’t help me that much, I just want to correct it.