Thanks for this report. It seems like this has been an issue since VaultWiki on XF 1.x way back in 2013-4, even though it might have only started causing data loss under XF 2.2. This occurs due to a misinterpretation of how the text fields should be prioritized during processing of BB-Code vs RTE. It was thought that XenForo gave priority to the RTE field, but it turns out it actually gives priority to the code field. Due to the data-loss potential, this issue will be handled by a patch.
Unfortunately, since BB-Code/RTE handling is spread out over multiple code areas and changes could have unforeseen consequences, I cannot provide any edits for now. In the mean time, your workaround of not using preview should suffice.