This only started when you upgraded to Yosemite? Can you explain what you mean by "screen lock"? What I mean is which step in the inactivity process does recording stop, and what are your settings for each of these:
1. When the screensaver starts (System Prefs > Desktop & Screen Saver > Screen Saver > Start After...)
2. When OS X requires a password to return to your desktop/applications (System Prefs > Security & Privacy > General > Require password...)
3. When the display itself goes into sleep mode (System Prefs > Energy Saver > Computer Sleep and Display Sleep)