iOS 5 introduces a new mechanism, which deletes downloaded application content as soon as it detects that space on the device is getting low. Currently there is no way of getting around this problem, since we can't change anything without violating Apple guidelines. We have to hope that Apple either changes the guidelines or alters the cleaning mechanism. Please make sure you always have enough space on the device at anytime to prevent this behavior from happening.
You can read a detailed explanation at Marco.org.