The non-locking context activation expects the render engine to have its own GPU contexts, which is not necessarily the case when compositing happens from the command line. Ensure that the contexts exist prior to attempt of activating them. Pull Request: https://projects.blender.org/blender/blender/pulls/118496