How to sign libre office documents in Debian/Ubuntu?

It used to work in Debian, but it doesn’t seem to work anymore in libreoffice 6 nor 7 on debian 10 not ubuntu 20.04 LTS
In Windows 10 it still works excellent with libreofice 7

In Debian 10 (with both libreoffice 6 and 7) the main problem is: certificate manager can see the certificate to sign but libre-office can not select the certificate.

This is the certificate

But libreoffice can not select it:

What can I do to get it, like it is possible on windows 10 and used to work until june/july last year on Debian 10

The answer is the same as to this question:

the-signature-is-ok-but-the-certificate-could-not-be-validated