We have to patch arduino-esp32 to be able to set this configuration. Maybe setting this to 3 improves the chance that an ESP connects to the best available AP. I can't find the default value right now, it's probably set in the precompiled WiFi libraries.
https://github.com/espressif/esp-idf/commit/d688fc3542fdba8801c7bd6780af26498e289213
We have to patch arduino-esp32 to be able to set this configuration. Maybe setting this to 3 improves the chance that an ESP connects to the best available AP. I can't find the default value right now, it's probably set in the precompiled WiFi libraries.