As the bulb and light fixture heat up, the loose connection is broken and the light is turned off. They make a connection again when the light turns on again. Is that correct? It's most likely a fault in the light fixture.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.