If some Ukrainians already have $ them buying bitcoin will not affect the hryvnia parity at all, that is something happening outside, if, on the other hand, they buy BTC or any other thing with hryvnias that will make the currency drop, by restricting this you try to limit the damage.
Russia has gone overboard with control not allowing citizens to purchase foreign currency at all despite not being ravaged by war, and it does make sense temporarily but in the long term both a ban and a restriction will prove to be worthless, it will just make the fall harder.
I was later thinking Ukraine received donations in bitcoin, altcoins, US dollars, Euro, Pounds and other foreign currencies, probably could also be one of the reasons or the main reason that NBU restricted hryvnia to be used to buy cryptocurrencies because they have a lot of foreign reserve as a result of donation. I do not include bitcoin and altcoins as foreign reserve, though you know that.