How to unlock a Mac that's been locked with Apple Remote Desktop's "curtain" screen lock
I don't have a Mac with ARD to test this, but this sunshine-ard utility suggests it can fix the problem. From a quick glance at the source code, it just sends a CFNotificationCenter message to quit the curtain mode.

I'm not sure if there's a way to hook in to the ARD logout process to have this run every time you disconnect your session, but at the very least you could run it via SSH as necessary.