Why do the system sounds keep turning on? Whenever I record with the voice recorder app on my Galaxy S5, the "system" sounds turn on— that is, the bloop sound whenever I click on something, the typewriter sounds when I type, the lock-click sound when the phone unlocks, etc. I would rather these sounds stay off permanently, and am tired of having to keep turning them off in settings.  How can I get these sounds to stay off?
I reckon this has to do with Samsung Galaxy S5 enhanced audio features typically Wise Voice

According to Samsung:


  Wise Voice, a new feature of the Galaxy S5, lets the volume and
  quality of a voice call remain consistent, no matter how far or near
  you speak from the phone. When you speak too far away from the phone
  or the sound is too low, Wise Voice detects it and turns the volume
  up; when you speak too close to the phone, it automatically lowers the
  volume.


I believe this somewhat have effects on system sounds, as volume is auto-controlled by the system to suit the specific environment.

Additionally the Samsung Galaxy S5 has 2 microphones. As explained from this article:  https://forum.xda-developers.com/galaxy-s5/help/microphone-problem-t2807110


  The secondary microphone is used for active (ambient) noise
  cancellation. This can be weighted as well when recording audio.
  Normal mode uses both mics omnidirectionally. Interview mode uses the
  secondary mic only in a directional beam pattern. And conversational
  mode takes directional top and bottom audio.


Your issue could be caused by a number of things from poor audio quality, poorly chosen presets or an obstructed  microphone triggering volume to up.

As a possible fix try adjusting the Samsung "wise voice" feature that adds microphone gain to compensate  audio recorded from a distant place or tweak the notifications or sound mode settings or perhaps automation to auto-off sounds when recording (e.g using Tasker):