Unlike all other location setters it seems .search is somewhat special. That's not per standard. See https://github.com/w3c/web-platform-tests/pull/10891 for tests.
This is probably related to https://bugs.webkit.org/show_bug.cgi?id=161176.
Safari Technology Preview 153 and Chrome Canary 1107 both fail two tests from below: https://wpt.fyi/results/html/infrastructure/urls/resolving-urls/query-encoding?label=master&label=experimental&aligned&view=subtest&q=query-encoding%2Flocation.sub.html
<rdar://problem/100126446>
I filed https://github.com/whatwg/html/issues/8308 to see if this is something we should change in the HTML Standard instead. Just using UTF-8 in more place has its benefits.
Tests are updated in https://github.com/web-platform-tests/wpt/pull/36019 and specification in https://github.com/whatwg/html/pull/8309. This is now a feature so this is INVALID.