According to the user manual of the D5100, p. 216, Release mode under the Shooting menu should stay configured, if you are in the programming mode, or in any of the modes A, S, or M.
However, as you are experiencing, it seems that either the manual is in error, or there is a logical error in the firmware of the D5100 that prevents it from functioning properly. Looking around your problem:
The author of a similar question here (How do I permanently set the continuous mode on the Nikon D5100?) It says that they change frequently and tend to use full auto mode (for the benefit of other people's use of the camera) ). Unfortunately, it is not clear if the poster was verified if the continuous release mode is maintained between shots when the P, S, A or M modes are used.
The start of the thread from dpreview.com, D5100 – Can you "remember" my release mode ?, asks the same question and, similar to the previous question from Photo.SE, you are using Automatic or Automatic Flash mode. But one of the respondents indicates that the camera will not remember the configuration in the P mode.
Because the D5100 was launched more than 7 years ago, and because there has only been one firmware update (which was to correct how the camera treated the updated EN-EL14a battery compared to the existing EN-EL14 battery), I would not keep any. I hope the behavior is arranged by Nikon. = (