I tried changing the CPU frequency for an ESP32 under Hardware --> Options from 240 down to 160 and 80.
When compiling, all cores and libs are recompiled (ok), but the resulting sketch is still running at 240MHz.
Doing the same thing under Arduino IDE, and the freq do change!
Measure freq e.g. by uint8_t freq = ESP.getCpuFreqMHz();