Gnome boxes error while starting an OS

While starting a guest OS in the Gnome Boxes an error is displayed:

2023-01-06T09:56:47.543984Z qemu-system-x86_64: -device virtio-vga-gl,id=video0,max_outputs=1,bus=pcie.0,addr=0x1: opengl is not available
2023-01-06 09:56:47.584+0000: shutting down, reason=failed

But the same was working a few days back. Is there any way to fix this issue?
Any help is appreciated.

Thank you.

The error was resolved after a few restarts of the host OS. But it keeps coming back. Is there a permanent/proper solution for this. Thank you.

Also another thing that worked was to disable 3D acceleration start the OS. Then power down enable 3D acceleration and start again. This worked but I am not sure as to the exact root cause of this behavior.