All praise is due to Allah, and may peace and blessings be upon the Messenger of Allah.
It is authentically reported in Sahih al-Bukhari and Sahih Muslim that the Prophet ﷺ said:
"When Ramadan begins, the gates of Paradise are opened, the gates of Hell are closed, and the devils are chained."
In another narration in Sahih Muslim, the wording is: "And the devils are shackled."
There are narrations specifying that the devils who are chained are the rebellious ones. However, the narration reported by Ibn Khuzaymah and Ibn Hibban with the wording, "The rebellious devils among the jinn are chained," was weakened by Imam al-Bukhari, who considered the more authentic version to be the statement of Mujahid rather than a hadith directly attributed to the Prophet ﷺ.
Other narrations concerning the chaining of rebellious devils have also been reported, but some are weak, while others are disputed regarding their authenticity and continuity of transmission.
A hadith also states: "Every rebellious devil is chained therein." However, this wording does not necessarily mean that only rebellious devils are chained to the exclusion of all others.
The strongest opinion is that the devils are chained generally during Ramadan, without restricting this to the rebellious devils alone, because the unrestricted wording is authentically established in both Sahih al-Bukhari and Sahih Muslim, and there is no explicitly authentic narration limiting the chaining to the rebellious jinn alone.
And Allah knows best.