I found the solution! I hope my app will pass App Store validation after this change!
I had to go to here:
Signing & Capabilities
App Sandbox
Hardened runtime:
… and check the box “Disable Library Validation”
Hoping this helps some future developers!
Pete