>>53386708That Charmander's flame wasn't going out because it was getting wet - it was going out because it had been left out in the wilderness with no food, water, or shelter and was likely succumbing to pneumonia. Charmander - like any fire time - can get wet without an issue, and the Charmander line in particular is fine with getting its tail flame wet or submerged, since it's similar in nature to Ponyta's flame made. The Dex entries have things a bit backwards - a Charmander doesn't die when its flame goes out, its flame goes out when it dies.
For the record, you can literally spray down your Charizard's tail to no ill effect in Scarlet and Violet while bathing them, so even if you take the anime or Origins with a grain of salt, the literal gameplay says they're just fine. You only get issues when enemy Pokemon shoot magical high-pressure water at them, something that would hurt a human as well (unless you think it tickles to get sprayed by a fire hose. Spoiler alter: It hurts. A LOT).