How did I fix «ERROR 1819 (HY000): Your password does not satisfy the current policy requirements» MySQL error for the `debian-sys-maint` user in Ubuntu 22?

Step 1

I added special characters (e.g.: #^) to the password, and then assigned the updated password to debian-sys-maint

ALTER USER 'debian-sys-maint'@'localhost' IDENTIFIED WITH caching_sha2_password BY '<updated password>';

Step 2

I updated /etc/mysql/debian.cnf with the new password.