simple
With headphones in: does not hang up.
With speaker on: Does not hang up.
In the Phone app with neither speaker or headphones (normal phone call): hangs up.
*** The logic in this decision is debatable but still makes sense. Because a user talking through headphones or speaker is likely to be using other functions, Apple has extended this shut up feature to the normal phone call, similar to muting an incoming call.
With headphones in: does not hang up.
With speaker on: Does not hang up.
In the Phone app with neither speaker or headphones (normal phone call): hangs up.
*** The logic in this decision is debatable but still makes sense. Because a user talking through headphones or speaker is likely to be using other functions, Apple has extended this shut up feature to the normal phone call, similar to muting an incoming call.