Packer boot command for Ubuntu 20.04 seems to type random garbage or lose characters

Hi, I am doing UEFI builds for 18.04, 20.04, and 22.04 and im specifically having problems with the 20.04 build typing random garbage or missing characters when its typing in the boot command and im not sure what could be the issue.

I am using the following for a boot command and have not customized any typing delay settings (if there are any):

      "boot_command":                 [
        "set gfxpayload=keep<enter><wait3>",
        "linux /casper/hwe-vmlinuz <wait3>",
        "autoinstall ds=nocloud-net\\;<wait3>",
        "/ubuntu-20.04/ ---<enter><wait>",
        "initrd /casper/hwe-initrd<wait>",

This same boot command works perfectly fine for 22.04. I am aware that 20.04 has a 5s boot wait compared to 18.04/22.04’s 30s boot wait but I have customized the 20.04 image to increase the wait timeout to 30s to eliminate that timing issue.

What could be causing the lost characters issue here? I am building using virtualbox-iso on a GCE cloud instance.

I think ive partially solved my problem through using boot_keygroup_interval set to 2s.