There is a way to deal with that: you build your fire under an overhang and keep the fire small enough that it doesn't cause a problem. The size is actually about right in that picture. The overhang trick works with a lean-to or a natural rock formation such as a cleft, undercut, or cave. You can even build your fire its own little lean-to separate from yours. With a wide stone formation set it to one side of you; with a deep one, set it at the mouth.
Here are a couple of videos about building shelters to protect fires from rain:
no subject
Well ...
Here are a couple of videos about building shelters to protect fires from rain:
https://www.youtube.com/watch?v=NQH8cCEt6C8
https://www.youtube.com/watch?v=XvuqHtJDmVE
And here's a discussion of stone options:
https://backpackinglight.com/forums/topic/39018/
Or you can just start your fire in the rain, but that kinda sucks for cooking:
https://www.montanaknifecompany.com/blogs/news/start-fire-with-wet-wood