Welcome to Android Central! Is it an official HTC case, or a 3rd party case? If it's not an official case, then go to Settings>Sound>Flip to Mute, and turn that function off. If it's on, it might assume that the phone has been placed face down to mute (unless it works by orientation sensors instead of the proximity sensor).