With gas bottles that catch fire at or near the valve its usually safer to leave them burning until the gas is used up and the fire goes out. Reason is that if even though you put the flame out, gas is still venting. The gas at the source of the leak is too rich to burn - it must drift away and mix with air until it achieves a gas/oxygen ratio (stoichiometry) that will support reignition and combustion (eg. from a cigarette, neighbour's BBQ, angle grinder, pilot light on water heater etc.) . Much depends on wind conditions and the volume of gas leaking out, but the distance the gas must drift to reach this gas/oxygen flash point can be anywhere from a few centimeters up to several hundred metres. If it does reignite all gas from the point of reignition to the bottle will go up - and if a big volume has leaked out some distrance it will cause an explosive fireball that can burn people in the vicinity.
The safest approach to a burning gas bottle can be to play a water hose on the bottle to keep it cool to prevent catastrophic rupture from the heat of the fire, and use the hose to wet down and put out spot fires on nearby flammable material (like fences, house walls and roofs, decks, young kiddies etc). And let it burn out.
If you think you would be more inclined to go in and try and shut the valve off after smothering the flame out (hopefully before a flashback reignition occurs) get in the practice of only cracking the valve open the bare minimum - usually a quarter turn is ample. I guess some adjustable regulators on big arse burners might need a bit more flow but it shouldn't need more than a single turn. It is much easier and safer to shut down a bottle valve with a quick flick of the fingers that to spend dangerous seconds winding it down several turns.