If anyone faces the same issue just as I did in 2023. This was the solution that finally resolved it.
Framework has to be signed along with the app if you are going to use different signer
codesign -f -s "Distribution Certificate Name" MyApp.app/Frameworks/*
then sign the app again
codesign -f -s "Distribution Certificate Name" MyApp.app
https://gist.github.com/chaitanyagupta/9a2a13f0a3e6755192f7?permalink_comment_id=1812865#gistcomment-1812865