The problem you are describing, is a result of a faulty proximity sensor.
What's supposed to happen is, when you listen to voice note or make a call, the screen will stay on, but as soon as you put the phone to your ear, the screen turns off. When the sensor is broken, it thinks that the phone is always by your ear.
One way to get around this, is by using an app called macrodroid.
You can set it in a way, that when the proximity sensor is activated while in WhatsApp, the screen will stay on.
Here are the few simple steps to set this up:
Open macrodroid → add makro → sensors → proximity sensor → near → ok. Now press on proximity sensor and add each of the options separately.
Press on actions on the top of the screen → screen → screen on/off → screen on (alternative) → ok
Constraints → device state → application running → running in foreground → ok → WhatsApp → ok. ↠ application running → alive in background → WhatsApp → ok.
Now press on the check mark on the bottom, and give a name to this action.
From the main page of the app, press in macros, and after pressing on the one you just made, near constraints, press on and and change it to or. You should see the exact settings as I have below:
Now test this out. Go into WhatsApp and make a call. The screen will stay in during the call.
The screen will stay an as long as WhatsApp is running, and it will disregard the set sleep time. It will also stay on while not in WhatsApp, as long as WhatsApp is running in the background. If that happens, you can go into your recent apps, and swipe WhatsApp away.
I tested this in s galaxy s5. No guarantee that it works across all phones.