That’s not that simple
As far as I could understand, your pin code (let’s say “password”) is used to validate against a keystore entry, which contains the key to decrypt the ext filesystem.
For the reference, here is a part of TWRP decrypt code : https://github.com/TeamWin/android_bootable_recovery/blob/android-10.0/crypto/ext4crypt/Decrypt.cpp. You can see it’s far from simple.
Ok, some well-known secret services could achieve with the decryption. But if this is your concern you should not use an AOSP-based device
One more thing : deleting the locksettings.db file on an encrypted device will not allow access to the data, it will simply prohibit any future access to them (it happened to me …).
About Konrad statement : I agree with that, but I think it’s not relevant to the encryption subject.
Encrypting your phone is a comprehensive security measure for data storage, not related to programs interoperability.
In other words : yes the programs can exchange data (copy/paste is the simplest form), but not directly read other’s storage.
Encryption is made to protect the whole data storage from “external” (read : offline) raw reading.