How to fix internet access in Windows Sandbox

Windows Sandbox already had this problem several times: When I started a new sandbox, it did not have internet access.a

One approach I tried today was to Disable and then Enable the vEthernet (Default Switch) Network Connection on the host. Within seconds after enabling it, the Windows Sandbox had internet access, so it seems this fixed the problem. The screenshot below shows where to find these settings on the host:

There is also this guide which contains some other ideas for how to fix this problem: