Using the R option "styler.save_after_styling" and if unset, checks legacy method via environment variable save_after_styling.
"styler.save_after_styling"
save_after_styling
save_after_styling_is_active()