Viewport render image > How to render custom background color?
It should work just fine.
This is the way I do it:

Viewport shading overlay &gt; Background &gt; Viewport (adjust to your needs)
View &gt; Viewport Render Image
Done