More than likely a code signing issue.
https://learn.microsoft.com/en-us/visualstudio/deployment/clickonce-and-authenticode?view=vs-2019
C# development is not supported here on QnA. I'd try asking for help in dedicated forums here.
https://social.msdn.microsoft.com/Forums/en-US/home?forum=csharpgeneral
--please don't forget to Accept as answer if the reply is helpful--
--------------------------
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.