Keyboard Viewer via keyboard shortcut wont actually quit after closing it
open -a and launch seem to keep it open as well. But if you show the keyboard viewer from the input menu and close the window, the process is quit immediately. So one workaround might be to emulate clicking the menu item:

tell application "System Events" to tell process "SystemUIServer"
    tell (menu bar item 1 where description is "text input") of menu bar 1
        click
        click menu item "Show Keyboard Viewer" of menu 1
    end tell
end tell



  Also, I can re-open the application after closing it via a keyboard shortcut ONLY WHEN I open the viewer via the menu button or settings.


If all windows have been closed, activate doesn't usually open a new default window. reopen would do that, but it doesn't seem to work with KeyboardViewer.