The user has to be aware of the limits of that particular type of "reset". For a more complete reset, including most registers etc. you can also use the watchdog timer. See: Arduino Reset via Software including post #2 which refers to a StackExchange contribution by @Juraj
The various types of resets retain different categories of status information. A power fail restart is the most clean.