When I switched to the Samsung s8 I noticed now that when I mute my phone it records silence while the other party is still talking. On the s7 I would mute my phone but it still recorded the convo.
Undoubtedly there is a bug in the Galaxy S8 ROM, when you mute or unmute the microphone the ROM wrongly route the audio. Many phones have this problem, for example Nexus 6P etc.
If you don't root the phone, you should wait Samsung to fix it in future ROM updates.
If you root the phone, Boldbeast Recorder can fix the problem perfectly.