It is tricky and easy to reset password on WSL2.
To do that, first of all, you need to set login as root by default:
ubuntu config --default-user root
Then change your password as root:
Change the password of root, of course:
In the end, change the default user of WSL2 back to your own username:
ubuntu config --default-user <YOUR_USERNAME>