gpg-card and gpg --card-edit both allow to factory reset OpenPGP cards. This is on purpose a command line only feature. This does not always work if Kleopatra is also running.
Technically gpg sends a RESET to scdaemon followed by a "SERIALNO undefined". Now Kleo notices the reset and does a standard SERIALNO which conflicts with the "SERIALNO undefined" from gpg. The solution I see for this is a new LOCK command (with a timeout) to gext exclusive acccess to the card by the current client