I experienced this issue with my s8 active. While in calls I could hear others clearly, however they could not hear my unless I switched to speaker. My solution was to replace the type c port chip (which includes the microphone). At this point I have full functionality of all microphones and speakers.
The issue you describe is different to what is being discussed in this thread. You should find a thread that discusses the same issue as you and post this. Other people may find this very helpful as a resolution
This happened to me. I discovered that debris, dust, and skin oil will collect on the speaker grill. Wiping and washing the front of the phone can push the grunge deeper. Put a small syringe of alcohol up to the grill and flush the grill and area behind the grill out.
My phone is working perfectly again!
wipe cache partiion.
shut off phone
Press hold Vol up key, and the Bixby key then press power key.
Android logo displays, release all keys, (installing system update) will show for 30-60 secs. before showing Android system recovery menu.
Press Vol down key and highlight wipe cache partition.
Press Power key to select
Press Vol down key to highlight and press Power key to select
when cache is wiped rebootsystem now is highlighted
Press Power key to restart.
Clean the speaker by pressing silly Puddy onto it and removing repeatedly. I had to do it about 20 times before I started to see a white residue. Once that was removed, the sound is perfect now.