The Messenger of Allah ﷺ would not launch military campaigns during the sacred month unless he was attacked or about to be attacked. When the sacred month arrived, he would remain in place until it had passed.
حدثنا حجين بن المثنى أبو عمر حدثنا ليث عن أبي الزبير
لم يكن رسول الله ﷺ يغزو في الشهر الحرام إلا أن يغزى أو يغزوا فإذا حضر ذلك أقام حتى ينسلخ
Its isnad is sahih. Hujayn bin Muthanna is Yamami, and Layth is Ibn Saad, and both are trustworthy. Haythami also said, 6/66, its narrators are the narrators of the Sahih. The meaning of the hadith is that when the Prophet ﷺ wanted to go on a military expedition during the sacred month, he would prepare for it but would not begin the expedition until the month had ended.