I’ve heard of Windows Defender locking the hosts file. Might need to look into that. Also, search this forum is a great resource.
https://localwp.com/community/search?q=windows%20host%20file%20locked
Specifically Help! I'm running into an EPERM error with the hosts file on Windows