It will work if you use "xattr -cr /path/to/application.app" as mentioned by @ourself here:
/t/506614/is-damaged-and-cannot-be-opened-error-on-macos