App Store apps can't be opened after upgrading macOS 10.12 to 10.13
Ok, I got so sick of it that I decided to reinstall my OS.
I even formatted the HD, and I did not restore from any backup.
While at it, I moved to 10.14.6.
When that installation was freshly done, the first thing I did was security updates and a reboot.
After that I wen't to the App Store and tried to install the app again.
The error from yesterday was gone but to my surprise I got the following error:

Then I followed all the steps here except the Upgrade to macOS Catalina:
https://www.saintlad.com/we-could-not-complete-your-purchase-app-store-on-mojave/

Check Network Connectivity
Verify Apple ID in App Store &amp; iTunes
Accept iTunes New Terms &amp; Conditions
Clear App Store Cookies and Cached Files
Clear App Store Temporary Files
-U-p-g-r-a-d-e- -t-o- -m-a-c-O-S- -C-a-t-a-l-i-n-a-
Get Support from Apple

When I was on the phone, I clicked to get the same error as in the picture to make sure I didn't confuse it with yesterday error's message. And yes I still got the error. Later in the conversation he asked me to try another app, which I had done before. But magically it worked now, and suddenly all worked.
So yeah, I recommend people to call Apple, and let them do whatever it is they are doing to fix this problem.