Whan can cause an ESP to see way less network than an other?

Almost all of my ESP devices see around 20 networks when doing a WiFi.scanNetworks().

But I got 3 new devices (robotdyn ATmega2560+ESP8266) that can barely see 2 networks and not even the closest ones… (Same sketch and project settings)

I was wondering if this could be impacted by some values that should be changed in the platformio.ini file.

Like any of those:
board_build.f_flash=xxxx
board_build.f_cpu=xxxx
board_build.flash_mode
-D F_CRYSTAL=xxxxx

How can I find the correct value to put on those settings?