Hi Hiren Shah,
I believe the setting you are looking for is built into the YouTube Studio interface.
By default it is set to "Unlist live replay once stream ends", from your description I believe this is the box you would need to adjust.
I hope this information proves helpful towards your desired production.
i need a script that runs before YouTube Live stream starts to change Privacy change from unlisted to Public. YouTube is changing Privacy setting on channel to unlisted after stream ends.