Enter the Pinna Park level where Green Flying Enemies are on the beach. Have one of them take your hat, causing you to slowly lose Health.
Next, talk to another person like a Pianta or Noki who is still in the Beach area.
Do not press A to go through the conversation. You'll notice you'll still be losing Health even when you are talking to the Pianta|Noki. Wait until you lose all of your health.
Mario will die, but the screen will be the same. You're still talking to the person!
However, when you scroll through the text in the conversation, you will lose a life and go out of the level.