Please note that its actually incorrect to say money is getting in or out certain physical place. If it becomes bitcoin, it is bitcoin everywhere. Bitcoin is border-less, once you change your country's fiat into Bitcoin, you have gained a worldwide asset. So rather than saying the money leaves Iran, you could say the money enters Bitcoin. It can still be used inside Iran at any moment, unlike doing the same with forex or some foreign bank account. The difference is huge if you stop to think about it...
Iranians buying bitcoin are not really taking the money out of the country, but they are saving it from both the country (Iranian State) and the potential aggressor/invader (see the military command economy they imposed to Germans after the fall of the 3rd Reich). This is one more reason why Bitcoin is so valuable rather than some physical asset that could be seized or destroyed, or a fiat that could lose all value overnight.
You were right about this, but still missing. When the local price of bitcoin rises too much, this means that they accept losing a large amount of money. The discrepancy between local prices and worldwide prices is a cause for their loss. In other words, it is the amount of damage they have to accept to own bitcoin. I am not sure if their actions are correct, this amount may be even greater than the amount lost due to inflation during the war. But in return, they have safety when they can use the money worldwide.