Ref. No. 1387/42-797
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follow:
According to the words used to trim the mustache in the Ahadith, the mustache should be trimmed with scissors so deeply that it seems to be shaved or the redness of the lips appears. This is allowed and also commendable. However, shaving the mustache with a razor or a blade is not recommended by the jurists, although it is permissible too.
عن ابن عمر قال قال رسول اللہ ﷺ انھکوا لشوارب واعفوا اللحی (بخاری ومسلم) واختلف فی المسنون فی الشارب ھل ھو القص وا الحلق ؟ والمذھب عندا بعض المتاخرین من مشائخنا انہ القص ، قال فی البدائع وھو الصحیح ۔ وقال الطحاوی القص حسن والحلق احسن وھو قول علماءنا الثلاثۃ (شامی 2/550) ثم فی المغرب احفی شاربہ بالحاء المھملۃ ای بالغ فی جزہ ۔ قیل الاحفاء قریب من الحلق ، واما الحلق فلم یرد بل کرھہ بعض العلماء ورآہ بدعۃ (مرقاۃ المفاتیخ شرح مشکوۃ، باب الترجل 7/2815)
And Allah knows best
Darul Ifta
Darul Uloom Waqf Deoband