Hi there, jundi78.
I see that whenever you switch sides to listen to a phone call, the call is disconnected and you hear the lock screen sound. This doesn't happen if you're using headphones or the speaker, and I'm happy to help.
About the buttons and switches on your iPhone, iPad, or iPod touch -- When a phone call disconnects, there's usually three beeps. If the lock screen is actually engaged, make sure your finger isn't on or near the side button when you switch sides.
Restart your iPhone, iPad, or iPod touch -- If your finger isn't near the side button, restart your iPhone. Once it's returned to the Home screen, test the issue.
How to back up your iPhone, iPad, and iPod touch -- If restarting your iPhone didn't resolve the issue, please be sure to have a fresh backup to keep your personal information safe. In order to back up your Health data, the backup needs to be encrypted. iCloud does this automatically, but iTunes doesn't. If you'd like to use iTunes to back up your iPhone, refer to this article: About encrypted backups in iTunes
If you can't update or restore your iPhone, iPad, or iPod touch -- When an application isn't working as expected, a good step is deleting and reinstalling the app. Since you can't delete the Phone application on your iPhone, I'd like for you to reinstall the iOS. The section titled "Put your device in recovery mode and set it up again" will walk you through all the steps to reinstall the iOS software on your device. See if calls stays connected when you switch sides
Let me know how that goes, and take care!