Since streamdecksharp 3.0 it's possible to wrap a board with the extension method IMacroBoard.WithDisconnectReplay() to create a deck reference that does that.
Example:
using var deck = StreamDeck.OpenDevice().WithDisconnectReplay();
// use deck here.
// 1. Set brightness and some key images
// 2. disconnect deck usb connection
// 3. reconnect deck
// 4. images and brightness are automatically set again
Since streamdecksharp 3.0 it's possible to wrap a board with the extension method
IMacroBoard.WithDisconnectReplay()
to create a deck reference that does that.Example: