You have tried reinstalling the system and if you have done it correctly then you can be sure that your system is fine. Also Safe Mode can be a problem, which proves that it's not a third party software. You can try to create a new local account to test it:
- Press “Win + R” at the same time to open “Run”, type “netplwiz” and click “OK! “You will open the account interface
- Select “add...” in this screen. Select “Do not use Microsoft account to log in (not recommended)” and click “next”.
- If the interface for entering user name and password does not appear, you need to select “Local Account”; if the interface for entering user name and password appears, skip to step 4 directly.
- Enter your username, password, confirm the password and other contents, you can create a local user.
- Next, give administrator privileges to this account. Go back to the first step and double click on the account you just created.
- Select the “Group Membership” tab at the top of the new pop-up window, then select “Administrator” and don't forget to click “OK” to save.
Log on to Windows with the new account, if the problem is solved, you can follow the “Copy files to a new user profile” method in the link below to migrate to the new account, after which your information will be transferred to the new account, or you can use another account instead of the original account.
Troubleshoot Problems Signing In to Windows - Microsoft Support
Best Regards,
Raylan-MSFT | Microsoft Community Support Specialist