Unfortunately no, task manager cannot run when the screen is locked.
But that does not answer the question, which is:
Can I make it automatically resume when I unlock the screen?
And now you have raised further questions:
This was not the way it behaved in earlier versions (earlier versions of Windows certainly, and maybe earlier versions of Windows 10). And, while this change may have made sense to someone, they were wrong, it makes NO sense. And why isn't this "feature" an option that can be, at least, enabled or disabled by the user?
Even better, why doesn't the user have two options?
- Resume when the screen gets unlocked -- enable/disable
- Do not pause EVER -- enable/disable