sbctl enroll-keys requires root to run couldn't sync keys issue

I am trying to create secure boot for EndeavourOS (Arch based) that is installed on virtualbox (enabled EFI mode). I am using systemD bootloader with dracut initramfs on the OS.

After running these commands:

sbctl create-keys sbctl enroll-keys -m

I am getting this error:

sbctl requires root to run: cound't sync keys: couldn't write efi variable: write /sys/firmware/efi/efivars/PK...: permission denied. I am running this as root.

On Virtualbox secureboot is disabled and I have clicked on the option "Reset Secure Boot Keys" in the UEFI settings.

When I ran:

sbctl status It shows that the Setup Mode is Enabled.