Invalid signature for libfmod.dylib on UE4 macOS shipping build

We are having problems signing the dylibs for a UE4 macOS shipping build.

Currently, we are using Unreal Engine 4.23.1 and using FMOD 2.01 plugin.

When building with development settings, the embedded dylibs are libfmodL.dylib and libfmodstudioL.dylib.
We sign just the game.app using an Apple Developer certificate and it works nicely.

However, when building with shipping settings, the embedded dylibs are libfmod.dylib and libfmodstudio.dylib.
Signing only the game.app with the Apple Developer certificate makes the app crash on opening with “Code Signature Invalid”
Signing the game.app, as well as all dylibs and the game binary also gives us a crash on opening with the same error. Furthermore, on the crash report it says that the libfmod.dylib file does not have a valid signature.

We are verifying codesigning with “codesign --verify --verbose” for both, the app, the binary and the dylibs and it says “Valid on disk. Satisfies its Designated Requirement”

How can we properly codesign these dylibs?

Additional information:

The error only happens if we codesign using the “hardened runtime” option (codesign -o runtime)

Removing this option from codesigning successfully codesign the shipping build with development certificate and I’m able to open the app normally.

Try with 2.01.01 which has just been released.