Solved.
So starting in MariaDB 10.4 onwards, the mysql.user is not a table anymore, thus requiring a new command to reset the password. Fortunately, the command is very simple:
SET PASSWORD FOR `root`@`localhost` = PASSWORD("new_password");
FLUSH PRIVILEGES;
With root is the root user, and new_password is the new password.
Maybe we can do a little bit automatic, we can wrap those expressions in one single command:
sudo mysql -u root -e 'SET PASSWORD FOR `root`@`localhost` = PASSWORD("new_password"); FLUSH PRIVILEGES;'
Maybe this can helps so many users with confusion on how to reset password MariaDB 10.4 or newer.
Reference:
Stackoverflow discussion
MariaDB SET PASSWORD
CC: @aaPanel_Kern