How to Fix OneDrive Sync Error 504 Gateway Timeout - Resolve Windows Activation Proxy Issues via Command Line-Handle Expired Authentication Tokens in PowerShell Scripts

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.