How to change the encryption key on (rooted) Android 9?
I don't think is documented anywhere the syntax but looking at this code
https://review.lineageos.org/c/LineageOS/android_system_vold/+/258179
I was able to set a different password.
Initially I used a PIN for unlocking, so the command to run on a terminal on lineageos 17.1 as root is:
vdc cryptfs changepw TYPEOFNEWPASSWORD OLDPASSWORD NEWPASSWORD

Where type of password can be:

password
pin
pattern