There is one way to change the values,...
... which actually won't work either: None of the (IDF) components you use, and which #include "sdkconfig.h" for their configuration, will "see" the new definition from your code.
As I understand it, the OP doesn't want to reconfigure the SDK from inside the ESP application (code) but wants to set/override certain values e.g. from the command line w/o having to interactively navigate through the menuconfig TUI. - But I can't seem to find a solution for that either.
It would be kind-of doable if the sdkconfig.h were generated as a set of
so that one could override values via -D compiler arguments.
Or, more simple, if sdkconfig.h would contain a line like #include "custom_sdkconfig.h" at the end, with a custom_sdkconfig.h which would be created empty by default but would not be re-generated by the build system. (Or even using
__has_include("custom_sdkconfig.h") to also work in the absence of the file.)