That’s often what happens when you float a currency because the peg tends to become overvalued. That leads to eventual capital flight and draining of foreign reserves.
Is nice to see the IMF pushing for floating currencies now. They used to push pegging the currency to attract foreign investment.