All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
When the teacher helps his student as such during the driving test in violation of the rules and regulations of the test, it constitutes cheating and a breach of trust.
As for the student, if he was not willing to receive such help and did not seek it, then he bears no sin for that, especially given that he clearly stated that he did not want the teacher's help and signs.
In any case, there is no harm on the student in the case mentioned in the question in keeping the driving license that he obtained.
Allah knows best.