Yes, a good password manager ought to securely erase temporary files and encrypt working memory and zero released memory. You don't get these extras dealing with a GPG encrypted file in a standard text editor.
I would assume no temporary files and short-lived process which reads/writes and dies. Then, of course, the burden is on the caller not to be careless with the state. I dunno. Just more curious here about the data at rest more than its use.
I'd assume data encrypted with AES (say by GPG) to be as secure as a password manager's DB, at rest. Provided you take care of adjust the iterations of the KDF, use a good KDF (like argon or scrypt), and tweak other parameters (like using a keyfile along with your passphrase) that a password manager might automatically set for you.
But there should be no essential differences between the two. In fact since GPG's code is more battle tested than most password managers it might even be more secure, other factors disregarded as you mention.