RTC memory values are not maintained after ESP.restart()

To maintain some value across softboots, I have been trying to keep some variables in RTC memory. But the values are lost after ESP.restart()
After researching in many places, I found that deepsleep is maintaining the values. Hence I changed to the following. Any idea, Why power is cutoff after restart call? esp_sleep_enable_timer_wakeup(4 * 1000000);
esp_deep_sleep_start();

To place a variable into the RTC memory, you have to define it with the RTC_DATA_ATTR attribute.

RTC_DATA_ATTR int bootCount = 0;

See the example here:

I have declared the variable with RTC_DATA_ATTR. I am able to to retain the values across deep-sleep. I expect ESP.restart(), is a soft restart and hence the power will be maintained in RTC memory section and hence I was expecting the values to retain.But it is not.
whereas esp_deep_sleep_start() call is retaining the value.
So my question is about ESP.restart()… and is there any change in ESP-S3, whether restart cuts-off power to RTC are during ESP.restart() call.

I’ve been able to trace ESP.restart() up until it ends into a call to esp_restart_noos() which is declared here:

I think the explanation can already be found in the comment:

CPU resets do not reset digital peripherals, but this function will
manually reset a subset of digital peripherals (depending on target) before
carrying out the CPU reset.

It is not mentioned here but i guess that the RTC is one of those peripherals.

Espressif will probably be able to provide you with more detailed answers. A possible starting point would be the ESP-IDF repostiory:

Thanks @sivar2311. This line clarifies it.