Sadly, the approach listed in magicandre1981's answer no longer works. In fact, it's almost like Microsoft is fighting an arms race with users, progressively making it harder and harder to disable this feature.
This page says you can disable this via
gpedit.exe, but doing that doesn't completely disable it.
This page lists a series of different ways (including
regedit.exe) which would all seem to have worked at some stage, but now the only one that completely shuts it down is the last one: Fighting it at the Windows Firewall level. And you have to read the fine print of that page to see that originally you blocked outbound connections from a predefined rule called "Search" but that rule doesn't exist anymore and you have to look for the "Cortana" rule instead. So:
- In the search box, type firewall and then select Windows Defender Firewall from the resulting list
- Click Advanced Settings
- Click Outbound Rules on the left-hand side
- Click the Name header to sort the rules alphabetically
- Depending on your build of Windows 10, find either the Search or Cortana rules. (In my case, there were two Cortana rules.)
- Click the rule (Search or Cortana).
- On the right-hand side, click Properties
- In the resulting dialog box, under Action, choose Block the connection
Of course, if you block Cortana, Cortana can't search the web for you anymore even when you specifically want it to.
Stupid Microsoft. Does it not occur to them that if people want to turn off search-the-web-from-the-search-box, that's their business?! Should have left the blasted setting there.