What could cause the garage door overhead light to not stay on while the door is opening?
The doorbell switch is not equivalent to the garage door switch it replaced, in some manner that upsets the opener. 

If your unasked question is "how to make the light stay on when the door is opening" you need to remove the doorbell switch and replace it with a garage door switch compatible with your opener.