“By degrees shall We teach you, so you will not forget, except what Allah wills” (Qur’an 87:6-7)

﷽
The clause, except by the Will of Allah comes in the Word of Allah to emphasize that what is reported happens by His Will (not otherwise). If he wills the opposite of that, it will be so. When Allah (swt) says that something happens if He wills it, it is intended to show His power and majesty because He has control over all things.
That is like in His saying, Exalted is He:
“By degrees shall We teach you, so you will not forget, except what Allah wills” (Qur’an 87:6-7)
If one argues that ‘except by what Allah wills’ is redundant language such that Muhammed (saw) must indeed have forgotten what Allah (swt) taught him then this would leave the whole of Islam in flux.
The meaning is that the exception here is to emphasize the negation.
If Allah (swt) wants the Prophet (saw) to recite the Qur’an without forgetting it, the exceptional clause cannot be construed to mean that, if He wishes, He will make him forget it. That would be a contradiction and defeat the whole purpose of the passage.
If one was to interpret the above passage that Muhammed (saw) did indeed forget some of what Allah (swt) taught him then we have no objective basis to determine what Muhammed (saw) fogot and what he did not.
This is why those who rely upon that which is unclear in tafsir always falter in their creed.
Allah knows best.
You may like to read the following:
May Allah Forgive the Ummah.
May Allah Guide the Ummah.