The always allow GUI is being triggered because codesign hasn’t been given an acl to access your private key. try this:
security unlock-keychain -p <my keychain password>
security import Certificate.p12 -k ~/Library/Keychains/login.keychain -P password -T /usr/bin/codesign
The -T flag tells security to allow codesign to have access to the keys you are importing in Certificate.p12.