Windows 10 reset password on CMD is not working

Those commands were run from the bootable Windows drive (WinPE?), so they applied to that instance of Windows, not your main system.

If you need more information on how to reset a forgotten password, please refer to the answers to this Superuser question.