If the setting resets itself on startup, consider the following steps:
- Relaunch the Unity Hub as an administrator.
- Right-click the Unity Hub icon and select run as administrator (this may be two right-clicks deep).
- Open a Unity project.
- Change the external script editor setting.
- Close Unity and the Unity Hub.
- Relaunch the Hub and Unity as normal.
If this still doesn't work, restart your computer and try again.