The screen should autmatically go dark and 'lock' itself when it next to your ear as a feature to keep you from disconnecting the call or hitting buttons while you are talking, and should automatically turn the screen on again when you pull it away from your face. If it doesn't do this then you may have a problem with the sensor on your phone and may need to get it replaced.
If you are talking using the hands free speaker phone, hitting the side button should not disconnect your call, it should wake up your screen. Try a factory reset and if it's still doing it have it replaced. To my knowledge there are no other known issues with this type of problem.