When you encrypt your wallet, Bitcoin Core does not simply encrypt the entire file. Instead, it uses a sophisticated system:
The wallet.dat file is the heart of a Bitcoin Core node. It contains the private keys, public keys, scripts, and transaction history that allow you to access and spend your Bitcoin. Understanding how this file works, how to secure it, and how to recover it is essential for anyone running a full Bitcoin node. What is the Wallet.dat File?
Store backups on encrypted media. Avoid storing backups on cloud services unless the file is separately encrypted with a strong password. Use multiple backup locations to protect against fire, theft, or natural disaster.