I do this a lot (not in public) because it’s way too easy to hang up with your ear and it fatigues my arm after like half an hour. It’s fine as long as you don’t shout into the phone.
Means you have a broken phone - they have sensor that turn off the screen when you're talking to someone and it's next to your ear. It shouldn't happen to you.