The Messenger of Allah ﷺ forbade traveling with the Quran into enemy territory.Malik said, "I believe this was out of fear that the enemy might get hold of it."
حدثنا عبد الله بن مسلمة القعنبي عن مالك عن نافع أن
نهى رسول الله ﷺ أن يسافر بالقرآن إلى أرض العدو قال مالك أراه مخافة أن يناله العدو
Bukhari narrated it in Jihad and Expeditions, chapter on the dislike of traveling with copies of the Quran into enemy territory, hadith 2990, from Qanabi, and Muslim narrated it in Leadership, chapter on the prohibition of traveling with the Quran into the land of the disbelievers, etc., hadith 1869, from the hadith of Malik through the same chain. It is also found in Muwatta (Yahya): 2/446.