When you close a ScratchPad tab, it just closes, meaning you lose anything that was in that tab.
An "are you sure?" confirmation would be nice to protect accidental clicks.
I think a persistent content might be a better solution just like how SublimeText and Notepad++ tracks unsaved tabs.
They are persisted in the "[workspace]\.metadata\.plugins\com.openedge.pdt.text" folder as "Tab##.txt", but when you close a tab the file is deleted