Encrypting a "test" file should give us test.gpg
# gpg -c test
But no, we get some errors.
gpg: problem with the agent: Permission denied
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of 'test' failed: Operation cancelled
Loopback mode to the rescue!
# gpg -c --pinentry-mode=loopback test
It prompts for your password and works as expected.
When it comes time to decrypt, maybe you change users and get an error:
gpg: problem with the agent: Permission denied
Loopback mode to the rescue!
# gpg --pinentry-mode=loopback test.gpg
Tested with...
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5
IMO --pinentry-mode=loopback
and --no-symkey-cache
should be the default settings. I found the solution here https://askubuntu.com/a/1158297/429995 and the "anonymous" answer here (to not cache the password) was helpful as well.