Newer versions of SolidWorks (2022 onward) have hard-coded fallbacks that detect hosts file redirection and refuse to proceed. Solution: You must either:
If you frequently move between networks (Office ↔ Home), SolidWorks may see a different IP address and attempt to re-activate, sometimes failing and locking your license. A host block stabilizes the activation. solidworks host file block install