The DrawManager assumed that the first render layer was the render layer where GP needed to render on. In viewport this is always the case as we only have a single view layer. When rendering this can be multiple when multiple layers are rendered and composited in the compositor. In stead of the assumption that the first render layer is the render layer we need to draw on, we search for the render layer with the same name as the viewlayer. Reviewed By: fclem, brecht, antoniov Maniphest Tasks: T63099 Differential Revision: https://developer.blender.org/D4818