Investigate window grab with non-exposed window. What if the window was never exposed, so there is no scenegraph initialized?
The tst_qquickwindow::grab() test case exercises both type of grabs: grabbing a window that is exposed and a window that is non-exposed (was never shown at all).
With Vulkan in particular that test case is currently failing due to falling back to a direct OpenGL code path. Vulkan is not exercised in the CI, but it must be fixed nonetheless.