My test procedure is correct.
Try it on Windows 10 (or the old Windows 10 style Explorer available via the Control Panel). It always works correctly in that case. It always fails (i.e. causes the address bar to drop down) on Windows 11.
Once the focus is in the main window (e.g. by tabbing there) it always works correctly.
The issue is that Explorer no longer changes the focus to the main window when it should (and always did in Windows 10).