If the stream is down for long enough that stream.offline is fired, then it’s going to have a different stream ID if it starts up again. There is some protection built in against minor stream outages to not fire the offline message right away, but beyond that it’s entirely up to you how you want to handle it within your app.
If you want it to look like a single stream, then you’d need your app to ignore the stream offline/online events if they happen close enough to eachother (how close for it to still be classed as the same stream would be up to you), and then also a way to track that the stream has 2 (or more) Stream ID’s.