Invalid Mex file

I am trying to run an optimization using CVX on Matlab for the first time and I get this error:
“mexsvec.mexmaci64” cannot be opened because the developer cannot be verified.
macOS cannot verify that this app is free from malware.”
I have already tried changing my Mac security to “Allow anyway” for this file, but it still gives me the same error.

In particular, this thread seems to have a solution for what appears to be the problem you have

It worked! Thank you.