If you don't need to back up data on the encrypted drive after unlocking, you can directly erase the Mac internal drive in macOS Recovery Mode, the erased drive should be non-encrypted and accessible.
You can encrypt an internal/external hard drive on a Mac in multiple ways. To unlock an encrypted drive, it requires you to enter the correct password. Erasing the SSD in macOS recovery mode will delete all contents, therefore, you should back up the SSD first if you need the data.
If you don't mind data loss, you can erase the encrypted SSD directly in recovery mode, it won't prompt for a password when the reformatting process completes, the drive is blank, unencrypted, and accessible.