The gemara has a concept that something which is set aside for the mitzvah, becomes muktzah for the duration of the time it is being used for the mitzvah. The two examples that the gemara speaks about are Succah decorations and Shabbos candles. Rashi explains that the rule is the same - so long as the mitzvah is still applicable they are muktzah, but afterwards they are permitted to be used. Therefore, a succah is forbidden to be used for other purposes for the duration of Succos since that is the time of its mitzvah, whereas the oil of the Shabbos candles are not allowed to be used (even according to Rav Shimon) for the duration of the time that the candles are burning. Tosafos explains even the oil that would squirt out from the candle would be forbidden to use during the time the candles are burning because that too was set aside for the mitzvah. But, after the flame goes out, the mitzvah is over and the oil may be used.
There is a Sh'iltos d'rav Achai Goan in Parshas Vayishlach that says that on the last day of chanuka if there is left over oil in the candles, one must make a fire and burn the oil. The Sh'iltos forbids the use of the oil for personal use because it was set aside for the mitzvah. Tosafos 44a d.h. she'bner, asks why Chanukah candles are different than Shabbos candles? Why is it that for Shabbos candles, when they go out we consider the mitzvah to be over and the oil is permitted, whereas by Chanuka candles even after Chanukah ends the oil is not permitted to use?
To answer this question, Tosafos makes a distinction between Shabbos candles and Chanuka candles. However, Tosafos is a little confusing because they mention two seemingly independent points in their distinction. Tosafos writes that Chanuka candles are not for one's personal benefit, rather to publicize the miracle, therefore one doesn't anticipate them extinguishing early and expect to use the oil. On the other hand, Shabbos candles are primarily there for the purpose of receiving benefit so that one is anticipating them going out and using the oil. Tosasfos seems to focus on two separate points: 1. Shabbos candles are permitted to benefit from whereas Chanuka candles aren't. 2. For shabbos candles one anticipates and hopes for them to go out sooner, whereas Chanuka candles which are there to publicize the great miracle, one wants to fully give over to the mitzvah. Rav Moshe (Dibros 38) writes that he doesn't understand why Tosafos had to mention the יושב ומצפה aspect at all. The distinction is quite simple. The halacha of the oil is the same as the use of the candle. Since Shabbos candles can be used, their left over oil can be used (just as food which is designated for the mitzvah of oneg shabbos can be used for mundane enjoyment since it is fundamentally for the purpose of deriving benefit). But since Chanuka candles is off limits from being used for any benefit, their oil cannot be used. If this were Tosafos' intent, they wouldn't have to focus on the fact that Chanuka is for publicizing the miracle and therefore one is not יושב ומצפה for them to go out. Rav Moshe leaves with at צריך עיון and doesn't understand why Tosafos has to make a big deal about the Chanuka candles being parsumei nissa, representing the miracle and wholeheartedly given over for the mitzvah?
I think that Tosafos considers the distinction Rav Moshe makes to be insufficient. The rule is as we find by a succah, after the mitzvah ends the left over material can be used. Even mitzvos which are not there for the purpose of deriving benefit, such as the mitzvah of succah, would be permitted to be used for mundane benefit after the mitzvah is over. Therefore, to simply distinguish between shabbos and chanuka based on whether the mitzvah is designed for one to benefit from, is not enough. Therefore, Tosafos is forced to explain that Chanuka is special. Since the mitzvah is there to publicize a miracle, one is happy to fully give over all the materials for the mitzvah without any anticipation of being able to use them. That is why even after the mitzvah is over, the materials remain assur. No other mitzvah would be like this, not even a mitzvah from which one cannot benefit during the mitzvah.
The Ritva (21b) writes that the prohibition to use the light of the Chanuka candles is technically only during the half hour that they need to be burning for. After the half hour it is technically permitted to even benefit from the light, just that we don't allow you to actually benefit from the light because of בזוי מצוה. However, the material is no longer considered to be connected to the mitzvah, therefore if it goes out, the mitzvah for that night is over and one is allowed to benefit from the oil. It is not like Succah where we consider the full 7 days to be one long mitzvah, rather the lighting of each night is independent. Therefore the Ritva rejects the sh'iltos who holds that after Chanuka one must burn all the oil. The Ritva permits the use of the left over oil even during chanuka, and even on that night (the ritva implies that according to the Rif even if it goes out early one can benefit from the oil, but the beis yosef 677 holds that only if it burned for its full time).