The Messenger of Allah ﷺ used to forbid traveling with the Quran into enemy territory, out of fear that the enemy might get hold of it.
حدثنا محمد بن رمح أنبأنا الليث بن سعد عن نافع
عن رسول الله ﷺ أنه كان ينهى أن يسافر بالقرآن إلى أرض العدو مخافة أن يناله العدو
Muslim narrated it in "Al-Imarah," chapter on the prohibition of traveling with the Quran to the land of the disbelievers when there is fear it may fall into their hands, hadith no. 1869, from Muhammad bin Rumh, through the same chain.