I believe AS Studio unloads the window from memory when the user closes it. One solution is to make it invisible instead of closing it.
on should close theObject
if name of theObject is "main" then
set visible of window "main" to false
return false
end if
end should close
on choose menu item theObject
if name of theObject is "nwind" then
set visible of window "mywindow" to true
show window "main" -- bring it to the front
end if
end choose menu item