Screen sharing - Remote screen off turns main display off
I believe that the answer to this is to use Remote Management instead of Screen Sharing.

Remote Management includes Screen Sharing, but when you disconnect it does not seem to turn off the screen, at least as of 10.11.3.

See also: How to stop display from turning off when I disconnect a Screen Sharing client.