Vertex paint not visible in viewport/capturecomponent unless mesh is selected on world outliner

Hello!

I’m trying to color my static meshes using vertex painting with random colors and then store it using ScreenCapture2D. However, I’m seeing a weird behavior. The vertex painting is successful, but my capturecamera or the gameclientviewport is not able to see the paints unless I select the mesh in editor.

SO, it’s something like this
The first figure shows setup after vertex painting (Note that I’m not able to see any paint)

The second figure shows the same setup after I’ve selected/clicked on few meshes in the editor.

To add to the above, I’m changing the FEngineShowFlags of the viewport to see the painted changes as follows:

ShowFlags.SetMaterials(false);
ShowFlags.SetLighting(false);
ShowFlags.SetBSPTriangles(true);
ShowFlags.SetVertexColors(true);
ShowFlags.SetPostProcessing(false);
ShowFlags.SetHMDDistortion(false);
ShowFlags.SetTonemapper(false);
GVertexColorViewMode =
EVertexColorViewMode::Color;

What could be causing this issue? I am not able understand why/how selecting the mesh, shows the paint color.

I’d appreciate any inputs regarding this. Cheers!