I can understand that Keepass needs to retain the passphrase in memory when the app is in use, but if the database is closed or locked and requires me to retype my passphrase to use it, I would have assumed that Keepass was wiping my passphrase from memory. However, that is not the case.
You can prove this to yourself:
pgrep -f keepass
My passphrase is retained in memory until I completely close keepass.
Tested on keepass 2.27