@benlk AFAIK there is no preference to disable this behavior. Seems like a good feature request to make.
In the meantime you could whip up a userscript/extension that removes all the `name` attributes on page load.
FWIW: The feature plays nice with find-in-page. When doing so, the UA will look into the contents of collapsed `<details>` elements. So in that regard it works better than the DIY JS-solutions authors came up with before.