Xrandr failed to change the screen configuration

Hi, I’m using rocky linux in a virtual machine, every time I turn on my rocky linux machine, starts with the deaful resolution of 800x600. I already added the resolution of 1360x768 and when I tried to set up with xrandr in user or root mode, I get the message “Xrandr failed to change the screen configuration”.
I need help.
Jorge

try :

xrandr --listactivemonitors
( show available modes)

xrandr --addmode VGA-0 1366x768
( add new mode )

xrandr --newmode "1366x768_60"
( set new mode )

if not work try via grub :