Net Core 2.2 on docker. Error:2006D080:BIO routines:BIO_new_file when access .pfx certificate by X509Certificate2

I have developed RSA + AES encryption on my Net Core and when the .Net Core gets an encrypted request it opens certificate.pfx to get a private key and to decrypt the received request

The code to access the certificate and get the private key looks:

var certificate = new X509Certificate2(@"Certificatecertificate.pfx", "Password");
rsaCng = (RSACng)certificate.PrivateKey;

The code works like a charm when deploying to a Windows server or running locally but it breaks when running the Net Core in Docker. Error:

“error”: “error:2006D080:BIO routines:BIO_new_file:no such file”

I have checked all possible scenarios:
1) The certificate has “Always copy” parameter in the Visual Studio and has been copied to the docker
2) The file has correct permissions: -rw-rw-r–
3) The Net Core is in the /app directory and the certificate is in the certificate folder as it is stated in the code above

Could you please please advise what can be an issue – the certificate 100% exists and has correct permissions?

Source: StackOverflow