My mom just had this issue.
At first it was just car play that didn't make any WhatsApp notification sound. Then the phone stopped making WhatsApp notification sounds but she was still getting notification sounds on her Apple watch.
We tried deleting WhatsApp and reinstalling but that didn't work.
We tried resetting WhatsApp notification settings but that didn't work.
We checked iPhone notification settings and they were all fine.
We checked she wasn't connected to any Bluetooth other than her Apple watch but that was all normal too.
Then I found this thread but since she uses bluetooth constantly either to connect her iphone to car play or her Apple watch, switching Bluetooth off to fix the bug was not an option.
I thought about checking Do Not Disturb. Her "do not disturb while driving" was set to Manual so that was good and she didn't have "do not disturb" on, nor did she have it scheduled.
Finally I thought since everyone on this thread had issues with not getting notifications when phone was locked that, even though she had do not disturb off and unscheduled, I would try and set the settings under "Silence" within "do not disturb" to "Always" instead of "While iPhone is locked". For good measure we switched "do not disturb" on and then of again.... And hey presto.... It worked, we get notification sounds again!
It was a complete shot in the dark but give it a try it might work for you too.
Good luck!