Automatically switches the call sound to hands-free mode.

iOS and iPadOS

Hello all,
from iOS 11 I have a problem with switching the sound during a phone call on my iPhone 6s+.
When I receive a notification during a call, I hear a sound in the receiver.
Then, after a moment, the caller's voice switches to the speakerphone mode.

I think that this is due to the backlight of the screen when the notification is received, and then its blanking after a certain time according to the system settings.

The handsfree mode is switched on not when the notification is received, only after some time from this event.

How exactly does it look like? Steps.
1. I conduct a conversation through the loudspeaker above the screen. Phone to ear.
2. During the conversation I receive a notification. I can hear the sound in the loudspeaker.
3. After 30 seconds, in the loudspeaker I hear the sound of the screen blanking and the conversation is transferred to the loudspeaker at the bottom of the phone. Speakerphone.
4. To switch back to the loudspeaker above the screen, I have to move the phone away from the ear, illuminate the screen by touching it and bringing it back to the ear again.

Has anyone encountered such a problem?
Apple has not corrected this bug for a long time, and I and my friends have been meeting for a long time.