Picture-Stream not loading after connection is closed

Hello there, i bought an ESP32 Cam and followed this tutorial:

I made a few modifications so that I have an status for what happened to me.
So here is my problem: When I start the camera and start home assistant after this OR restart over the GUI, everything works as expected. But if I unplug the camera and reconnect it, the stream / pictures won’t load anymore.
As i told before I added an status over MQTT and immediately changes from unavailable to on again.
If i go to the local IP the stream also loads.
Does any one have an idea how I can configure home assistant so that it checks for an stream after the stream was closed?

If y’all need anything else let me know, appreciate any help!

Thanks in advance!

P.S. I hope y’all understand my problem. My English is not the best :smiley: